PowerShell converting System.Byte[]
hi,
have writing garbled data of our extensiondata attributes, on of our distribution lists. i'll use repadmin /showobjmeta track down offending user account in meantime i'm trying output particular attribute csv in order find out ones have been borked.
here's 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
returns dn, date object changed , extensiondata:
system.byte[]
or some:
system.byte[];system.byte[];system.byte[];system.byte[];system.byte[];system.byte[]
etc.
i'm struggling convert believe hexadecimal value readable string , hoped help.
if don't include line:
@{l='extensiondata'; e={$_.extensiondata -join ";"}}
extensiondata attrib csv shows:
"microsoft.activedirectory.management.adpropertyvaluecollection"
thanks!
have writing garbled data of our extensiondata attributes, on of our distribution lists. i'll use repadmin /showobjmeta track down offending user account in meantime i'm trying output particular attribute csv in order find out ones have been borked.
here's 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
returns dn, date object changed , extensiondata:
system.byte[]
or some:
system.byte[];system.byte[];system.byte[];system.byte[];system.byte[];system.byte[]
etc.
i'm struggling convert believe hexadecimal value readable string , hoped help.
if don't include line:
@{l='extensiondata'; e={$_.extensiondata -join ";"}}
extensiondata attrib csv shows:
"microsoft.activedirectory.management.adpropertyvaluecollection"
thanks!
a couple of these previous questions (with answers) regarding extensiondata may solve issue:
http://social.technet.microsoft.com/forums/windowsserver/en-us/16124c53-4c7f-41f2-9a56-7808198e102a/attribute-seems-to-give-byte-array-how-to-convert-to-string?forum=winserverpowershell
boe prox
blog | twitter
poshwsus | poshpaig | poshchat | posheventui
powershell deep dives book
Windows Server > Windows PowerShell
Comments
Post a Comment