Hi Team.
I dont do a lot with AR scripts that use the AR functions and i seem to always get lost
So I have a VA and lets call it VA1 , when this is set to TRUE i have a workflow that should kick off the below script.
Am i passing the SamAccountName when $Request is used or am i missing something here?
# Connect to ARS Connect-QADService -Service "AR-Server-Name" -Proxy #Import Duo PowerShell Module Import-Module Duo #Date $DateYear = $((Get-Date).ToString('yyyy')) $DateMonth = $((Get-Date).ToString('MMM')) $DateDay = $((Get-Date).ToString('dd')) #Time $Time = Get-Date -Format "HH-mm" #Create Folder structure based on Date New-Item -ItemType Directory -Path "PATH-Here\$DateYear\$DateMonth\$DateDay" -Force New-Item -ItemType Directory -Path "PATH-Here\$DateYear\$DateMonth\$DateDay\Logs" -Force $logfile = "PATH-Here\$DateYear\$DateMonth\$DateDay\Logs\Duo-User-Sync-$time.txt" function onPostModify($Request) { duoSyncUser -username $Request | out-file $logfile -Append }