Hi Guys,


I have to build multiple servers all with the same file expiration task in FSRM , i am trying to create a powershell script that will auto create this but it seems to be failing, if anyone can have a look and shed some light on this for me please

The script is over 5 lines and is as below

$d = get-date "09:00am"
$task = newfsrmScheduledtask -time $d.tofiletimeUTC() -weekly Monday, Tuesday
$action = New-fsrmsmjaction -type expiration -experationfolder "c:\trash"
$condition = New-fsrmfmjcondition -property "file.datecreated" -condition equal -valu "date.now + 7"
new-fsrmfilemanagementjob -Name "delewte after 7 days -namespace "c:\scans -schedule $task -action $action -Condition $condition



Thanks