Find Active Directory users with non-compliant LogonScript

Hello,

If you want to identify all users in your Active Directory domain with a non-compliant LogonScript, you can use PowerShell :

Get-ADUser -Filter {ScriptPath -ne "LogonScript.vbs"} -properties ScriptPath | select Name,ScriptPath,enabled

You can also re-mediate them with :

Get-ADUser -Filter {ScriptPath -ne "LogonScript.vbs"} -properties ScriptPath | % {Set-ADUser -Identity $_ -ScriptPath "LogonScript.vbs"

Leave a Reply