No I am aware the Get-ADuser is not defined above. If I use the “get-adser User.Name” I get the intended output.
So what I would like to do is combine these and have the users pulled from the names.csv then output to the manager list.
Im fairly novice to power shell and trying to expand my knowledge, I did a search but didnt find anything specially for this. If its there I apologixwe in advance and please link it to me if I missed it.
In your scripts, specifically, @{name=‘userID’;expression={$_.name}} that return the display name of the user. If you need the username of the user, you should use the SamAccountName property. Also, using the Import-Csv returns an object which requires headers to import the data.
try below code it will work for you …
Get-ADUser we have a mandiory field that is “Filter” parameter which needs to pass or put * that was missing your code.