Another rookie mistake I expect. I’m running the following and it works without error and I’ve a longer script that runs perfectly as well. However, on some occasions I just want to check up on someones line manager so I wrote this:<\/p>\n
Get-ADUser x | Select SamAccountName,Enabled,@{N=\"Manager\";E= {%{(Get-AdUser $_.Manager).Name}}}\n\n<\/code><\/pre>\n
Advertisement
Which returns, a blank manager. Thoughts?<\/p>\n
SamAccountName Enabled Manager\n-------------- ------- -------\nx True \n<\/code><\/pre>","upvoteCount":2,"answerCount":6,"datePublished":"2018-03-02T16:45:45.000Z","author":{"@type":"Person","name":"michaelcoyle","url":"https://community.spiceworks.com/u/michaelcoyle"},"acceptedAnswer":{"@type":"Answer","text":"