locked
PowerShell: Split Active Directory user object, info attribute values RRS feed

  • Vraag

  • Using Powershell, how do I split a string value attribute like the 'info' attribute for an AD user?  The attribute value within the user object appears as one line on the 'Attribute Values' tab but it shows as multiple lines in 'Notes:' on the 'Telephone' tab of the same user object.

    I have tried using the -split '`r', ';' for instance to no avail.  Am I missing something? What should I do?

    • Verplaatst door Bill_Stewart maandag 7 maart 2016 20:20 Abandoned
    woensdag 20 januari 2016 23:15

Alle reacties

  • If it is multiline it should be an array of lines.

    $a=$_.Info -split "`r`n"
    $a[0]


    \_(ツ)_/


    • Bewerkt door jrv woensdag 20 januari 2016 23:37
    woensdag 20 januari 2016 23:32