Disclaimer
This is my personal blog. The opinions and views I express are my own. The information I provide is on an as-is basis. I make no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this blog and will not be liable for any errors, omissions, or delays in this information or any losses, injuries or damages arising from its use.

How to get the local Administrators of one or many computers remotely with PowerShell.

This is a request that was made by someone a few months ago. It’s been a while so I apologize for not remembering who requested it. We’re using the Win32_GroupUser class to get the local administrators of a computer or many computers remotely. The function is modular enough to give you the ability to view the results in the console, export to a CSV, or a text file if you really wanted to I guess.

If you know of an easier method of doing this please let me know.

Code Download: https://github.com/signalwarrant/Powershell/blob/master/Get-LocalAdmins.ps1

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.