Create Home Folder Script & Schedule Task

Hi, I need some help with scripting in ARS.  I have a powershell script that works when run, but I'm trying to created a scheduled task in ARS, that creates a users home folder on a server based on the users extensionAttribute1 (cost center).  If the account was created in the last 1 day, the script should run and create the users home folder.

Here is my script and it is failing at the first -filter.  I don't really know the proper scripting in Quest/One Identity so any help would be greatly appreciated.  This does work successfully in Powershell. Thanks

$date = ((Get-Date).AddDays(-3)).Date
$newUsers = Get-QADUser -filter {whenCreated -ge $date} -properties samaccountname,extensionAttribute1,employeeID,enabled

foreach ($user in $newUsers){
$empID = ""
$cc = ""
$samAccountName = ""
$enabled = ""
$empID = $user.employeeID
$cc = $user.extensionAttribute1
$samAccountName = $user.samAccountName
$enabled = $user.enabled
$userPath = "\\juno\ctstorage\$cc\Users\$samAccountName"
if (!(Test-Path ($userPath)) -and (Test-Path("\\juno\ctstorage\$cc\Users")) -and ($enabled) -and ($cc -ne "") -and ($empID -ne "00000") -and ($empID -ne "99999") -and ($emp -ne "CONSULT")){
MKDIR "$userPath"

$rule=New-Object System.Security.AccessControl.FileSystemAccessRule ("ssc\$samAccountName","Modify",”ContainerInherit,ObjectInherit”,"None","Allow")
$acl = Get-Acl $userPath
$acl.SetAccessRule($rule)
Set-Acl -path $userPath -AclObject $acl
}

}