Hi,
We have something writing garbled data to some of our extensionData attributes, on some of our Distribution Lists. I'll use repadmin /showobjmeta to track down the offending user account but in the meantime I'm trying to output this particular attribute to csv in order to find out which ones have been borked.
Here's my current command:
get-adgroup -filter * -properties extensionData,whenChanged | where-object{$_.extensionData -ne ""} | select distinguishedname, @{L='extensionData'; E={$_.extensionData -join ";"}}, whenChanged | export-csv out.csv -NoTypeInformation
This then returns the DN, the date the object was changed and for extensionData:
System.Byte[]
or for some:
System.Byte[];System.Byte[];System.Byte[];System.Byte[];System.Byte[];System.Byte[]
Etc.
I'm struggling to convert what I believe to be a hexadecimal value into a readable string and hoped someone could help.
If I don't include the line:
@{L='extensionData'; E={$_.extensionData -join ";"}}
Then for the extensiondata attrib the csv shows:
"Microsoft.ActiveDirectory.Management.ADPropertyValueCollection"
Thanks!
We have something writing garbled data to some of our extensionData attributes, on some of our Distribution Lists. I'll use repadmin /showobjmeta to track down the offending user account but in the meantime I'm trying to output this particular attribute to csv in order to find out which ones have been borked.
Here's my current command:
get-adgroup -filter * -properties extensionData,whenChanged | where-object{$_.extensionData -ne ""} | select distinguishedname, @{L='extensionData'; E={$_.extensionData -join ";"}}, whenChanged | export-csv out.csv -NoTypeInformation
This then returns the DN, the date the object was changed and for extensionData:
System.Byte[]
or for some:
System.Byte[];System.Byte[];System.Byte[];System.Byte[];System.Byte[];System.Byte[]
Etc.
I'm struggling to convert what I believe to be a hexadecimal value into a readable string and hoped someone could help.
If I don't include the line:
@{L='extensionData'; E={$_.extensionData -join ";"}}
Then for the extensiondata attrib the csv shows:
"Microsoft.ActiveDirectory.Management.ADPropertyValueCollection"
Thanks!