Hello,
I am trying to get a script together for resetting passwords for all the users in a specific OU however I want to exclude 4 accounts from the process as they have static accounts. Also the password would have to be set to change on next logon again making sure the 4 accounts are excluded.
Does anyone know how to do this?
My Attempt is:
<BR><BR>$OU = "OU=users,OU=freshfield,OU=schools,DC=stockport,DC=sch,DC=UK" Get-QADUser -searchRoot $OU | where{-not "admin" -or "cog" -or "technical" -or "headteacher"} set-mailbox -identity $_.samAccountName -password "password"<BR><BR>Basically the where clause is looking for some generic accounts with headteacher, cog, technical, and admin in them the rest of the passwords can be changed to whatever password is set.
Many Thanks
James