I'm using the following command:
Get-QADUser -IncludedProperties extensionAttribute1 -SearchRoot someou | ft extensionAttribute1
This returns the value of this property for every user in that ou. I want the value to be added to a listbox but only once for each value and use this in the script found here(
http://technet.microsoft.com/en-us/library/ff730949.aspx)
e.g. the above script returns 5 times "something1" and 5 times "something2". I want the listbox containing just 1 time "something1" and 1 time "something2" so I can use this in the selectbox([void] $objListBox.Items.Add("som
ething1").
How can I achieve this?
Thnx Remco
$arrTitle = Get-QADUser -IncludedProperties extensionAttribute1 -SearchRoot [root] | foreach {$_.extensionAttribute1} | select -uniq
foreach ($arr in $arrTitle){
Write-Host $arr
[void] $objListbox.Items.Add("$ar
}