Avatar of DBThomson76
DBThomson76
Flag for United States of America

asked on 

Powershell script to search remote computers for certain service account in local groups

I am trying to create a script to search several computers and list what groups a specific user is a member of an export to a csv file.

Example:

ComputerA has a user called USERA that is a member of the local Administrators group and Remote Desktop Users group

ComputerB has a user called USERA that is a member of the local Administrators group and Backup Operators group

The cvs file would list the computer name, USERA, and groups that it is a member of

ComputerA,USERA,Administrators
ComputerA,USERA,Remote Desktop Users
ComputerB,USERA,Administrators
ComputerB,USERA,Backup Operators

Any help is greatly appreciated.
PowershellScripting Languages

Avatar of undefined
Last Comment
Pber

8/22/2022 - Mon