Link to home
Start Free TrialLog in
Avatar of Mandy_
Mandy_

asked on

Powershell Set extensiondata (String to Byte array) Active Directory

Hi,

could anybody help me to write the attribut "extensiondata" to AD?

I'm getting the data as follow:

Get-ADuser -id 'tjones' -Properties extensiondata | select -ExpandProperty extensiondata  | ForEach-Object {[System.Text.Encoding]::ASCII.GetString($_)}

The result is:
ZHMAILBOX
WEBMAILBOX

I like to write the string ZHMAILBOX to ByteArray and set extensiondata with this bytearray.

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mandy_
Mandy_

ASKER

Great! Thank you so much!