Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog

Nncmcoltemplate

Publié le par damcuvelier

# Remplacez ces valeurs par celles correspondant à votre environnement SCCM

$siteCode = "<YourSiteCode>"

$totoCollectionName = "toto"

$titiCollectionName = "titi"

 

# Récupérer les informations de la collection "toto"

$totoCollection = Get-CMCollection -Name $totoCollectionName -SiteCode $siteCode

 

# Créer une nouvelle collection "titi" basée sur les informations de "toto"

$newCollection = New-CMCollection -Name $titiCollectionName -Comment $totoCollection.Comment -LimitingCollectionID $totoCollection.LimitingCollectionID -RefreshType $totoCollection.RefreshType -RefreshSchedule $totoCollection.RefreshSchedule -RefreshType $totoCollection.RefreshType -ServiceWindows $totoCollection.ServiceWindows -MembershipRules $totoCollection.CollectionRules

 

# Afficher le résultat ou effectuer d'autres actions nécessaires

$newCollection

 

 

Commenter cet article