Master account management script
-
Monday, February 20, 2012 4:14 PM
Does anyone have a script to go through every workstation in a domain and list all local accounts and local groups & group members on ALL workstations, and out put it into some form of tabular report perhaps in excel? Perhaps with “account status” type information as well, i.e. similar to that which you’d get from a NET USER command where you’ve got fields such as:
- Account active
- Account expires
- Password last set
- Password expires
- Password changeable
- Password required
- User may change password
i.e.
Users>
Machine name V
-------------------------------------------------------------------------------------------------------
PC12345 Administrator, Admin, Guest
PC12346 Administrator, Dave, Guest
PC1234567 Administrator, Dave2, Guest
All Replies
-
Monday, February 20, 2012 4:23 PM
Actually there is a similar thread in which this was answered today you can do it with this powershell code:
Get-ADUserComputer -Filter * | % { gwmi -ComputerName $_.Name Win32_UserAccount -Filter "LocalAccount = 'True'" | Select *
Here is the relevant thread with similar examples of code:
http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/3aa4d428-2531-4e1c-82f1-9af203773a56
- Proposed As Answer by jrvMicrosoft Community Contributor Monday, February 20, 2012 6:05 PM
- Marked As Answer by Boe ProxModerator Friday, February 24, 2012 12:43 AM

