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


Bonjour à tous,

Le script fourni dans http://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 ServicesEn 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 http://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 ServicesWithout 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 (2)

  1. Lukas says:

    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 🙁

  2. Didier Akakpo says:

    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

Skip to main content