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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.