Reputation: 79
I'm basically new to PowerShell. May I ask what do I need to do in Get-ADUser -filter.. to pull out users that have the same description?
Upvotes: 1
Views: 2623
Reputation: 10044
You could use the Group-Object
cmdlet to group object together with the same description.
Get-ADUser -Filter * -Properties Description |
Select-Object Name,Description |
Group-Object Description |
Where-Object {$_.count -gt 1}
Upvotes: 2
Reputation: 2308
Get-ADUser -Filter * -Properties Description | Select Name,Description | Sort Description
You could add another pipe to Format-List or Format-Table or export with Export-CSV or Export-CliXML
Upvotes: 2