none
Copy sidHistory to msExchMasterAccountSID and msRTCSIP-OriginatorSID attribute RRS feed

  • Frage

  • For a AD Migration Szenario I have to copy over the Values from the sidHistory Attribute of each user to the msExchMasterAccountSID and the msRTCSIP-OriginatorSID from the same User.
    I do not have have much powershell experience so all my trys are unsuccsessfull :-(

    Please help.....

    Many Thanks
    Kind Regards
    Harald

    Dienstag, 15. Februar 2011 08:52

Antworten

  • $list = Get-ADUser -filter * -SearchBase "OU=Users,OU=xxx,DC=xxx,DC=xxx" -Properties sidHistory
    foreach ($item in $list)
    {
    $sidstr=$item.sidHistory.Value.ToString()
    Set-ADUser $item -Add @{"msRTCSIP-OriginatorSid"=$sidstr}
    }

    This is working now...
    msRTCSIP-OriginatorSid must be in quotation marks otherwise it will be treated as an expression.

     

    Donnerstag, 17. Februar 2011 14:34

Alle Antworten

  • Hi, try the QUEST AD-cmdlets . If you have trouble with the resulting script, just post it here and we'll see what we can do.

    Denniver

    Dienstag, 15. Februar 2011 12:45
    Moderator
  • I want to copy the value from SIDHistory (something like S-1-5-21....) into the msRTCSIP-OriginatorSID Attribute from a user object. For some reason this attribute will expect another format. If i copy the value to msExchMasterAccountSid this working well.

    Code which is working for msExchMasterAccountSid:

    $list = Get-ADUser -filter * -SearchBase "OU=Users,OU=xxx,DC=xxx,DC=xxx" -Properties sidHistory
    foreach ($item in $list)
    {
    $sidstr=$item.sidHistory.Value.ToString()
    Set-ADUser $item -Add @{msExchMasterAccountSid=$sidstr}
    }

    Code which isn't working for msRTCSIP-OriginatorSid:

    $list = Get-ADUser -filter * -SearchBase "OU=Users,OU=xxx,DC=xxx,DC=xxx" -Properties sidHistory
    foreach ($item in $list)
    {
    $sidstr=$item.sidHistory.Value.ToString()
    Set-ADUser $item -Add @{msRTCSIP-OriginatorSid=$sidstr}
    }

    Mittwoch, 16. Februar 2011 09:57
  • also the Quest cmdlets don't work!

    Code:

    $User=get-qaduser -Identity xxxxxx -IncludeAllProperties

    Set-QADUser -Identity at00908130 -ObjectAttributes @{msRTCSIP-OriginatorSid=$user.sIDHistory}

    Error:MissingEqualsInHashLiteral

     

    Mittwoch, 16. Februar 2011 13:22
  • $list = Get-ADUser -filter * -SearchBase "OU=Users,OU=xxx,DC=xxx,DC=xxx" -Properties sidHistory
    foreach ($item in $list)
    {
    $sidstr=$item.sidHistory.Value.ToString()
    Set-ADUser $item -Add @{"msRTCSIP-OriginatorSid"=$sidstr}
    }

    This is working now...
    msRTCSIP-OriginatorSid must be in quotation marks otherwise it will be treated as an expression.

     

    Donnerstag, 17. Februar 2011 14:34