1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Param ( [string]$ComputerName = $env:COMPUTERNAME, [string]$Application ) Write-Host "Getting information from computer $ComputerName." if ($Application) { Get-WmiObject -ComputerName $ComputerName -Namespace root\ccm\clientsdk -Class CCM_Application | Where-Object {$_.Name -like "*$Application*" } | Select-Object Name, Revision, InstallState, ApplicabilityState, ConfigureState | Sort-Object Name | Format-Table -AutoSize } else { Get-WmiObject -ComputerName $ComputerName -Namespace root\ccm\clientsdk -Class CCM_Application | Select-Object Name, Revision, InstallState, ApplicabilityState, ConfigureState | Sort-Object Name | Format-Table -AutoSize } |