Aracılığıyla paylaş


Comment exécuter le script Set-DistributionGroupOwners.ps1 sans Active Directory Web Services (ADWS) ?

Bonjour à tous,

Le script fourni dans https://blogs.technet.com/b/exchange/archive/2011/05/04/how-to-manage-groups-with-groups-in-exchange-2010.aspx ne fonctionne que dans une forêt Active Directory disposant de Active Directory Web Services (ADWS). Cette fonctionnalité est activée par défaut sur les DC Windows Server 2008 R2 mais n’existe pas sur le DC Windows Server 2003/2008.

En l’absence d’ADWS, l’exécution du script va générer l’erreur suivante :

PS] C:\install>.\Set-DistributionGroupOwners.ps1 -DistributionGroup DL-Marketing -GroupOwner GS-MarketingDLOwners

WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services running .'.

Setting GS-MarketingDLOwners as the owner of DL-Marketing

Get-ADGroup : Unable to find a default server with Active Directory Web Services running.

At line:1 char:77

+ Set-Distributiongroup -identity DL-Marketing -CustomAttribute5 (get-adgroup <<<< GS-MarketingDLOwners).distinguishedname

    + CategoryInfo : ResourceUnavailable: (GS-MarketingDLOwners:ADGroup) [Get-ADGroup], ADServerDownException

+ FullyQualifiedErrorId : Unable to find a default server with Active Directory Web Services running.,Microsoft.ActiveDirectory.Management.Commands.GetADGroup

Solutions:

Bien entendu, à valider sur votre plateforme de test et pré-production avant mise en production :-)

 

------- English version -------

How to run the script Set-DistributionGroupOwners.ps1 without Active Directory Web Services (ADWS) ?

 

Hello All,

The script published on https://blogs.technet.com/b/exchange/archive/2011/05/04/how-to-manage-groups-with-groups-in-exchange-2010.aspx works only in an Active Directory forest that provide Active Directory Web Services (ADWS). This feature is enabled by default on the Windows Server 2008 R2 Domain Controller but doesn't existe natively on Windows Server 2003/2008 Domain Controllers.

Without ADWS, the script execute generate this kind of errors :

PS] C:\install>.\Set-DistributionGroupOwners.ps1 -DistributionGroup DL-Marketing -GroupOwner GS-MarketingDLOwners

WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services running .'.

Setting GS-MarketingDLOwners as the owner of DL-Marketing

Get-ADGroup : Unable to find a default server with Active Directory Web Services running.

At line:1 char:77

+ Set-Distributiongroup -identity DL-Marketing -CustomAttribute5 (get-adgroup <<<< GS-MarketingDLOwners).distinguishedname

    + CategoryInfo : ResourceUnavailable: (GS-MarketingDLOwners:ADGroup) [Get-ADGroup], ADServerDownException

+ FullyQualifiedErrorId : Unable to find a default server with Active Directory Web Services running.,Microsoft.ActiveDirectory.Management.Commands.GetADGroup

Workaround:

As a best practice, you must validate the scirpt in your lab and prepreoduction platform before deploying in your production environment :-)

 

Enjoy!

 

Didier Akakpo

Set-DistributionGroupOwnersW2K3.txt

Comments

  • Anonymous
    June 02, 2012
    Hi, it seems that your modified script doesn't work recursively searching thru the owning group and also the sub groups in environment without  ADWS :-(

  • Anonymous
    June 04, 2012
    Hi Lukas, Thanks for your comment. Effectively, the script doesn't go through group tree recursively. A new version, but also with ADWS, was provided by Exchange Team to go recursively: blogs.technet.com/.../how-to-manage-groups-with-groups-in-exchange-2010.aspx In short term I'm not plan to adapt the new Exchange Team version for none ADWS platform. I'll try a new release asap. Regards, Didier