Created
December 17, 2013 12:27
-
-
Save janikvonrotz/8004160 to your computer and use it in GitHub Desktop.
PowerShell: Get All Cost Centers and Department Names
#PowerShell
#ActiveDirectory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extensionattribute2 ist cost center number | |
Get-ADUser -Filter * -Properties extensionattribute2, department | where{$_.extensionattribute2 -and $_.department} | select extensionattribute2, department -Unique | sort extensionattribute2 | out-gridview |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment