Get Members of User Role Via PowerShell
I need to get the members of the SCSM user roles via PowerShell for a security review. I can get the user roles themselves but I can't find a relationship to get the members. I know someone knows what I'm missing.
Nick
Best Answer
-
Adam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
With the case of SMLets, it isn't a relationship but in fact just a property on the User Role itself. The following SMlets pulls User Groups + an array of their Users
Get-SCSMUserRole | select displayname, user | sort displayname
Then if you wanted to, cycle through the User property with a combination of Active Directory Powershell with Get-ADUser and Get-ADGroup.
Is that what you're looking for?
0
Answers
With the case of SMLets, it isn't a relationship but in fact just a property on the User Role itself. The following SMlets pulls User Groups + an array of their Users
Then if you wanted to, cycle through the User property with a combination of Active Directory Powershell with Get-ADUser and Get-ADGroup.
Is that what you're looking for?
Thank you, @Adam_Dzyacky! This is exactly what I needed.