Question
Liste des GPO's.
- CAPRON
- Auteur du sujet
- Hors Ligne
- Nouveau membre
-
Réduire
Plus d'informations
- Messages : 6
- Remerciements reçus 0
il y a 17 ans 4 mois #3206
par CAPRON
Liste des GPO's. a été créé par CAPRON
Bonjour,
Je veux lister les GPO de mon AD, mais j'ai le message d'erreur ci-dessous dès la création de mon objet:
Le code que j'utilise:
[code:1]function GetAllGposInDomain(
[string] $domainName=$(throw '$domainName is required'))
{
$gpm = New-Object -ComObject GPMgmt.GPM # Create the GPMC Main object
$gpmConstants = $gpm.GetConstants() # Load the GPMC constants
$gpmDomain = $gpm.GetDomain($domainName, \"\", $gpmConstants.UseAnyDC) # Connect to the domain passed using any DC
$gpmSearchCriteria = $gpm.CreateSearchCriteria() # Create a search criteria without any restrictions
$gpmDomain.SearchGPOs($gpmSearchCriteria) # Search and find all GPOs in the domain, this will return the array
}
GetAllGposInDomain \"nomdomaine.fr\"[/code:1]
Si quelqu'un a une idée, je suis preneur.
D'avance, merci.
VCPN
Je veux lister les GPO de mon AD, mais j'ai le message d'erreur ci-dessous dès la création de mon objet:
New-Object : Cannot load COM type GPMgmt.GPM.
Le code que j'utilise:
[code:1]function GetAllGposInDomain(
[string] $domainName=$(throw '$domainName is required'))
{
$gpm = New-Object -ComObject GPMgmt.GPM # Create the GPMC Main object
$gpmConstants = $gpm.GetConstants() # Load the GPMC constants
$gpmDomain = $gpm.GetDomain($domainName, \"\", $gpmConstants.UseAnyDC) # Connect to the domain passed using any DC
$gpmSearchCriteria = $gpm.CreateSearchCriteria() # Create a search criteria without any restrictions
$gpmDomain.SearchGPOs($gpmSearchCriteria) # Search and find all GPOs in the domain, this will return the array
}
GetAllGposInDomain \"nomdomaine.fr\"[/code:1]
Si quelqu'un a une idée, je suis preneur.
D'avance, merci.
VCPN
Connexion ou Créer un compte pour participer à la conversation.
- Laurent Dardenne
- Hors Ligne
- Modérateur
-
Réduire
Plus d'informations
- Messages : 6311
- Remerciements reçus 68
il y a 17 ans 4 mois #3208
par Laurent Dardenne
Tutoriels PowerShell
Réponse de Laurent Dardenne sur le sujet Re:Liste des GPO's.
L'objet COM n'est pas référencé (Gpmgmt.dll).
Au cas où regarde ici :
www.microsoft.com/downloads/details.aspx...B&displaylang=fr
Au cas où regarde ici :
www.microsoft.com/downloads/details.aspx...B&displaylang=fr
Tutoriels PowerShell
Connexion ou Créer un compte pour participer à la conversation.
- Grégory
- Hors Ligne
- Membre senior
-
Réduire
Plus d'informations
- Messages : 49
- Remerciements reçus 0
il y a 17 ans 4 mois #3209
par Grégory
Réponse de Grégory sur le sujet Re:Liste des GPO's.
Il faut installer GPMC
je viens d'essayer ça marche pas si il n'est pas installé
je viens d'essayer ça marche pas si il n'est pas installé
Connexion ou Créer un compte pour participer à la conversation.
- CAPRON
- Auteur du sujet
- Hors Ligne
- Nouveau membre
-
Réduire
Plus d'informations
- Messages : 6
- Remerciements reçus 0
il y a 17 ans 4 mois #3215
par CAPRON
Réponse de CAPRON sur le sujet Re:Liste des GPO's.
Bonjour,
Merci...
Je me prosterne à vos pieds grand maitre...
Bonne journée.
VCPN
Merci...
Je me prosterne à vos pieds grand maitre...
Bonne journée.
VCPN
Connexion ou Créer un compte pour participer à la conversation.
Temps de génération de la page : 0.084 secondes
- Vous êtes ici :
-
Accueil
-
forum
-
PowerShell
-
Entraide pour les débutants
- Liste des GPO's.