Disable computer accounts

  • 628 Views
  • Last Post 09 December 2016
yogeshcittu posted this 26 September 2016

Hi All, Can anyone please me with PowerShell script to disable bulk computer accounts and also move the disabled computer accounts to a specific OU. Regards,
Yogesh

Order By: Standard | Newest | Votes
idarryl posted this 26 September 2016

here you go: http://bfy.tw/7tGC
~
Darryl

show

VolkerE posted this 27 September 2016

Why using Powershell when a simple commandline can do the job?


dsquery computer -stalepwd

400 -limit 5000

 

you can pipe the result to the next command to disable, move or whatever you want…

 

show

jhondrake posted this 24 October 2016

You could also take a look at the below article which helps to find, disable or move inactive accounts.

 

http://activedirectorycleanup.blogspot.in/2014/08/find-inactive-users-compueters-inAD.html

stevelane85 posted this 01 December 2016

Here is an article for managing Inactive Active Directory Accounts Using PowerShell.

However, in order to move the disabled computer accounts to a specific OU, get help from this Active Directory Cleanup solution: https://www.lepide.com/lepideauditor/active-directory-cleanup.html

Thanks,

sam_bloom posted this 09 December 2016

Here's a PowerShell cleanup script that deals with computer accounts as well. You can take the parts you need from it: http://www.adaxes.com/blog/cleanup-active-directory-with-powershell.html

Close