After Modify Rule

Is there a way to get the sAMAccountName in the after modify rule?
Thank you.

Hi Biplav,

The after modify rule runs a powerhell script, so you can use something like this to get the sAMAccount name into the script, assuming you have one of the user attributes that you can filter on:

Get-AdUser -Filter {EmailAddress -eq “[email protected]”} | Select-Object -ExpandProperty SAMAccountName

1 Like