
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2018 11:17 PM - last edited on ‎04-01-2024 04:46 PM by Mercedes_O
I'm looking to get the manager name from a user and pass it to a script for maintenance.
{manager} is not an option that works but it is the name of the ad field.
I'm able to pass {username} to my script -(powershell)- but I need to get the ad user's manager as well.
Any help would be greatly appreciated!
Thanks!
Labels:
- Labels:
-
API & Integrations
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2018 09:26 PM
Thank you SO much! It works perfectly!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 11:44 AM
You can use this in your powershell script to find the manager :
$manager = (get-aduser (get-aduser $user -Properties manager).manager).samaccountName
Then you can use $manager where you want to.
$manager = (get-aduser (get-aduser $user -Properties manager).manager).samaccountName
Then you can use $manager where you want to.
