ARSS: DisableAccount as part of deprovisioning task

I have ARSS deprovisioning workflow which 1) moves account into certain OU 2) Disables it. I cannot seem to find an easy way to handle disablement option. I'll probably have to handle UserAccountControl as a part of Powershell script just want to see if better option exists? Thanks!

Parents Reply
  • This worked well ;)

    $Log = "D:\QUEST\ARSS\DeprovisionJobs.log"
    $result = $null
    if (-not (test-path $Log))
    {
    New-Item $Log
    }
    $result = $dstObj["userAccountControl"]
    if ((($dstObj["userAccountControl"])[0] -band 2) -eq 0)
    {
    "`"$(Get-Date -Format G)`",`"$($dstObj["samaccountname"])`",`"DISABLING`"" | out-file $Log -Append
    $result = $dstObj["userAccountControl"] + 2
    }
    $result

Children
No Data