Forum Discussion
alexrabbi
Dec 22, 2022Brass Contributor
powershell query
Hi All , I am using below command to get a list of all active users in AD, what should i add to this command to get UPN and Object ID ? Get-ADUser -Filter {Enabled -eq $true} -properties * | ...
- Dec 22, 2022List all the properties you want included in the CSV as part of the select-object cmdlet:
Select-Object UserPrincipalName,ObjectId,samaccountname,givenname,surname,Enabled
VasilMichev
Dec 22, 2022MVP
List all the properties you want included in the CSV as part of the select-object cmdlet:
Select-Object UserPrincipalName,ObjectId,samaccountname,givenname,surname,Enabled
Select-Object UserPrincipalName,ObjectId,samaccountname,givenname,surname,Enabled
alexrabbi
Dec 24, 2022Brass Contributor
Thanks Vasil, that worked