script to move disabled users to OU


hello,

does have powershell script move disabled users ou?

thank you

something else consider piping through out-gridview, using -outputmode multiple.  this gives user opportunity manual filter before accounts moved:

$movetoou = "cn=ou name,dc=doman,dc=com"  search-adaccount -accountdisabled -usersonly | select name,distinguishedname | out-gridview -outputmode multiple | foreach {   move-adobject -identity $_.distinguishedname -targetpath $movetoou -whatif  }


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL