TUTOS.EU

Afficher les packages d'un site SCCM en Powershell

Clear-host
Import-Module "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"

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

Set-Location "$($MonSiteCode):"


#$AppList = Get-CMApplication | Where-Object {$_.LocalizedDisplayName -match "Agent DESlock"}| sort-object -property LocalizedDisplayName				
$AppList = Get-CMApplication | select LocalizedDisplayName, LocalizedDescription, PackageID, IsDeployed | sort-object -property LocalizedDisplayName	

			
foreach ($App in $AppList)
{
    $App

}
Lien vers le fichier : cliquez ici Copier le code

Exemple


2