Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Need to get a users MemberOf and the groups ManagedBy as variables.

$
0
0

Hey,

Working on a script to disable user accounts, and i got a request to add a function so that everytime a user gets disabled the script sends a mail to that users boss/bosses.

Since we have all bosses as ManagedBy in AD for their respective groups i will need to get the data from the groups. Any ideas on how to proceed?

Tried fiddling with "Get-ADUser -Identity $UserName -Properties MemberOf" but can't really pipe the information to usefull variables.

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles