Dynamic Group - Update

Hi Team. 

Is it possible to update (Rebuild) a specific Dynamic Group membership via Powershell?

Thanks in advance 

Parents
  • Yes, there are a few ways to do this.

    The easiest way is to simply re-write the existing accountNameHistory value to the accountNameHistory attribute.

    This will trigger a Dynamic Group rebuild.

    You could use something like this:

    $group = Get-QADGroup GroupDN -IncludedProperties accountnamehistory
    
    $accountnamehistory = $group.accountNameHistory
       
    Set-QADGroup $group.dn -ObjectAttributes @{accountNameHistory=$accountnamehistory}

Reply
  • Yes, there are a few ways to do this.

    The easiest way is to simply re-write the existing accountNameHistory value to the accountNameHistory attribute.

    This will trigger a Dynamic Group rebuild.

    You could use something like this:

    $group = Get-QADGroup GroupDN -IncludedProperties accountnamehistory
    
    $accountnamehistory = $group.accountNameHistory
       
    Set-QADGroup $group.dn -ObjectAttributes @{accountNameHistory=$accountnamehistory}

Children