Powershell : Remove logon scripts Removes logon scripts on a particular OU. $path = [adsi]"LDAP://OU=Users,OU=IT,OU=Eu,DC=eu,DC=somewhere,DC=com" $obj = New-Object adsisearcher($path , "(scriptPath=*)") $users = $obj.FindAll() foreach ($user in $users) { $user = [adsi]$user.path $user.PutEx(1,"scriptPath",$null) $user.SetInfo() } Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Filed under: Blog - @ February 24, 2016 11:24 am