I want to attach a string to a Get-ADUser object.
$VALUE = "Something : Else "
$RESULT = Get-ADUser -Filter 'givenName -eq "Joe" ' -Property * |
Select-Object -Property givenName, Surname, "$VALUE"
I got some bracket { } instead of "Else"
PS C:\> $RESULT
givenName : Joe
Surname : Black
Something : Else : {}
But I want this here!
PS C:\> $RESULT
givenName : Joe
Surname : Black
Something : Else
I try to put the Get-ADUser object into a string array and then attach $VALUE but that doesn't works.
Has anybody a idea?
Because I have to save it into a CSV file.
$RESULT | Export-CSV $DESTINATION -NoTypeInformation -Encoding UTF8 -Delimiter ';'