Hello,
I just want to do a very simple thing:
I want a list of all the users from a specific location. The list should include Name, logonname, email, enbaled or disabled, domain.
I got everything apart from the domain.
What I have so far:
Get-ADUser -Filter ‘physicaldeliveryofficename -eq “XXX”’| Select-Object name,SamAccountName,Userprincipalname,enabled
for some reason I had to get the emailadress via the principalusername Select-object […],mail,[…] did not work.
I tried to select DC, domain, server non of this works.
Thank you for your help!!