Hello, I am a PowerShell 3.0 novice and want to add a feature to my first ever production script tool.
The script below will get all local user accounts from remote computers listed inÂ a .txt file then export to .csv format.Â How exactly can I incorporate what local groups each local user account is a member of?Â For each local user account retrieved I want to list what local groups it is a member of.
get-ciminstance -classname win32_useraccount -filter “localaccount=‘true’” -computername (get-content C:\PS<listofcomputers>.txt) | export-csv c:\PS<name>_localuseraccounts.csv (export to .csv)
Your insight is greatly appreciated,
Matt, PS 3.0 novice