Last active
January 17, 2018 15:38
-
-
Save danjpadgett/cf1b2f671081a1e464c89528b040ccdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$collectionname = Read-Host -Prompt "Enter collection name" | |
$result = @() | |
$Data = Get-CMDeployment | ?{$_.collectionname -like "$collectionname"} | select collectionname, NumberErrors,NumberInProgress,NumberOther,NumberSuccess,NumberTargeted,NumberUnknown | |
foreach($entry in $Data){ | |
$resData = New-Object System.Object | |
$resData | Add-Member -type NoteProperty -name Errors -value ($entry.numbererrors) | |
$resData | Add-Member -type NoteProperty -name InProgress -value ($entry.numberinprogress) | |
$resData | Add-Member -type NoteProperty -name Success -value ($entry.NumberSuccess) | |
$resData | Add-Member -type NoteProperty -name Targeted -value ($entry.NumberTargeted) | |
$resData | Add-Member -type NoteProperty -name Unknown -value ($entry.NumberUnknown) | |
$resData | Add-Member -type NoteProperty -name OverallSuccess% -value ($entry.NumberSuccess / $entry.NumberTargeted * 100) | |
} | |
$result += $resData | |
$result | ft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment