top of page

Trouver le sitecode SCCM (MECM) en PowerShell

L'information du sitecode SCCM (MECM) est stockée dans WMI, nous pouvons donc aller rechercher l'info en utilisant du PowerShell.


Voici la commande à utiliser :


$SCCMSiteCode = $([WmiClass]"\\localhost\ROOT\ccm:SMS_Client").GetAssignedSite()
$SCCMSiteCode.sSiteCode

Si tu souhaites en savoir plus sur la méthode SMS_Client je te redirige sur ce lien :

https://msdn.microsoft.com/en-us/library/jj874307.aspx


Enjoy ! 😎

bottom of page