janikvonrotz
12/17/2013 - 12:27 PM

PowerShell: Get All Cost Centers and Department Names #PowerShell #ActiveDirectory

PowerShell: Get All Cost Centers and Department Names #PowerShell #ActiveDirectory

# extensionattribute2 ist cost center number
Get-ADUser -Filter * -Properties extensionattribute2, department | where{$_.extensionattribute2 -and $_.department} | select extensionattribute2, department -Unique | sort extensionattribute2 | out-gridview