Hello,
I am facing an issue to retrieve the
latest SCCM application deployment status info
after having updated the application content (right click on deployment type then 'update content')
here is the function I'm using :
functionGet-DeplymentReport
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)][string]$CollectionName,
[Parameter(Mandatory=$True)][string]$appname
)
$appInfo=Get-CMDeployment-CollectionName$CollectionName|
select CollectionName,SoftwareName,NumberTargeted,NumberSuccess,NumberErrors,NumberInProgress,NumberOther,NumberUnknown,PackageID,CreationTime,ModificationTime,DeploymentTime,SummarizationTime
# | ft -autosize #Out-GridView
$appInfo =$appInfo|whereSoftwareName-eq$appname
$appInfo
if($appInfo.NumberSuccess-eq$null ){
write-host" no information reported yet for'$appname '"
}
if(($appInfo.NumberTargeted-eq$appinfo.NumberSuccess)-and ( $appinfo.NumberSuccess-ne$null )) {
write-host"$appname déployed with success"
}
if($appInfo.NumberSuccess-eq$appinfo.NumberErrors-eq '0' ) {
write-host"$appname no info in inventory yet"
}
if(($appInfo.NumberInProgress-gt0 )) {
write-host"$appname being deployed …"
}
if($appinfo.NumberErrors-ge1){
write-host"$appname déployed with at least "$appinfo.NumberErrors" failures" $appinfo.NumberTargeted" machines"
}
}
The issue is that this still return me all ok / all deployed if I update the SCCM application content ....
Thanks in advance.
MCTS Windows Server Virtualization, Configuration