<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SCCM Software Update Status Archives - the Sysadmin Channel</title>
	<atom:link href="https://thesysadminchannel.com/tag/sccm-software-update-status/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/tag/sccm-software-update-status/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Fri, 07 Dec 2018 21:03:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">144174110</site>	<item>
		<title>Get SCCM Software Update Status using Powershell</title>
		<link>https://thesysadminchannel.com/get-sccm-software-update-status-powershell/</link>
					<comments>https://thesysadminchannel.com/get-sccm-software-update-status-powershell/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Mon, 12 Nov 2018 21:59:14 +0000</pubDate>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[SCCM]]></category>
		<category><![CDATA[sccm 1610 software updates compliance dashboard]]></category>
		<category><![CDATA[sccm 2012 "windows updates" report how to monitor software update deployments in sccm]]></category>
		<category><![CDATA[sccm 2012 software update compliance reports]]></category>
		<category><![CDATA[sccm 2012 software update deployment status report]]></category>
		<category><![CDATA[sccm check update status powershell]]></category>
		<category><![CDATA[sccm software update point]]></category>
		<category><![CDATA[SCCM Software Update Status]]></category>
		<category><![CDATA[sccm software updates compliance dashboard]]></category>
		<category><![CDATA[sccm update compliance status]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1101</guid>

					<description><![CDATA[<p>I created an SCCM Software Update Status script because very recently I wanted to check the status of my Software Update Deployments within SCCM and quickly found out that there was no easy way of exporting the data I needed.&#8230; <a href="https://thesysadminchannel.com/get-sccm-software-update-status-powershell/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/get-sccm-software-update-status-powershell/">Get SCCM Software Update Status using Powershell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I created an SCCM Software Update Status script because very recently I wanted to check the status of my Software Update Deployments within SCCM and quickly found out that there was no easy way of exporting the data I needed.  For example,  I wanted to export all of the computers that were in progress or <a href="https://thesysadminchannel.com/remotely-check-pending-reboot-status-powershell/" rel="noopener" target="_blank">pending a reboot</a> so I can run another script and possibly reboot them during off hours.  I also wanted to check to see which computers had errors or failed updates so I can quickly run a remote scan cycle and see if that remediates the problem. </p>
<p>I was able to identify the problem, now it was time to create a solution.  So with a little  bit of Google searching and some knowledge from ol&#8217; trusty <a href="https://amzn.to/2HoPSfw" target="_blank" rel="noopener">Learn Powershell In a Month Of Lunches Book</a> I was able to create <strong>Get-SCCMSoftwareUpdateStatus.ps1</strong></p>
<h2>Script Requirements</h2>
<p>If you&#8217;re using the <code>DeploymentIDFromGUI</code> parameter you will need to have the SCCM Configuration Module installed on your computer.  Otherwise, this script uses WMI to gather the data.  If you&#8217;re running the script remotely, you will need to have access to the SCCM server, although that should be a given.</p>
<h2>Script Parameters</h2>
<ul>
<li><strong>DeploymentIDFromGUI:</strong> A grid view of your current Software Update deployments will pop up.  Select the update you want to query and click OK.</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentIDFromGUI-Example.png" target="_blank"><img fetchpriority="high" decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentIDFromGUI-Example.png" alt="DeploymentIDFromGUI Example" width="962" height="522" class="aligncenter size-full wp-image-1117" srcset="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentIDFromGUI-Example.png 962w, https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentIDFromGUI-Example-768x417.png 768w" sizes="(max-width: 962px) 100vw, 962px" /></a><br />
&nbsp;</p>
<ul>
<li><strong>DeploymentID:</strong> Manually enter in a DeploymentID. To get the DeploymentID, go to <strong>Monitoring -> Deployments -></strong> Right Click the column header and select <strong>AssignmentID</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-AssignmentID.png" target="_blank"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-AssignmentID-1024x358.png" alt="DeploymentID AssignmentID" width="1024" height="358" class="aligncenter size-medium wp-image-1121" srcset="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-AssignmentID-1024x358.png 1024w, https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-AssignmentID-768x268.png 768w, https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-AssignmentID.png 1377w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><br />
&nbsp;</p>
<ul>
<li><strong>Status:</strong> This parameter allows you to filter by status.  Only Success, InProgress, Error and Unknown are valid.</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-with-Status.png" target="_blank"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-with-Status.png" alt="DeploymentID with Status" width="901" height="452" class="aligncenter size-full wp-image-1124" srcset="https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-with-Status.png 901w, https://thesysadminchannel.com/wp-content/uploads/2018/11/DeploymentID-with-Status-768x385.png 768w" sizes="(max-width: 901px) 100vw, 901px" /></a></p>
<h2>Get SCCM Software Update Status Powershell Script</h2>
<pre class="brush: powershell; title: ; notranslate">

function Get-SCCMSoftwareUpdateStatus {
&lt;#
.Synopsis
    This will output the device status for the Software Update Deployments within SCCM.
    For updated help and examples refer to -Online version.
 

.DESCRIPTION
    This will output the device status for the Software Update Deployments within SCCM.
    For updated help and examples refer to -Online version.


.NOTES   
    Name: Get-SCCMSoftwareUpdateStatus
    Author: The Sysadmin Channel
    Version: 1.0
    DateCreated: 2018-Nov-10
    DateUpdated: 2018-Nov-10

.LINK
    https://thesysadminchannel.com/get-sccm-software-update-status-powershell -


.EXAMPLE
    For updated help and examples refer to -Online version.

#&gt;

    [CmdletBinding()]

    param(
        [Parameter()]
        [switch]  $DeploymentIDFromGUI,

        [Parameter(Mandatory = $false)]
        [Alias('ID', 'AssignmentID')]
        [string]   $DeploymentID,
        
        [Parameter(Mandatory = $false)]
        [ValidateSet('Success', 'InProgress', 'Error', 'Unknown')]
        [Alias('Filter')]
        [string]  $Status


    )

    BEGIN {
        $Site_Code   = 'PAC'
        $Site_Server = 'PAC-SCCM01'
        $HasErrors   = $False

        if ($Status -eq 'Success') {
            $StatusType = 1 
        }

        if ($Status -eq 'InProgress') {
            $StatusType = 2
        }

        if ($Status -eq 'Unknown') {
            $StatusType = 4
        }

        if ($Status -eq 'Error') {
            $StatusType = 5
        }

    }

    PROCESS {
        try {
            if ($DeploymentID -and $DeploymentIDFromGUI) {
                Write-Error &quot;Select the DeploymentIDFromGUI or DeploymentID Parameter. Not Both&quot;
                $HasErrors   = $True
                throw
            }

            if ($DeploymentIDFromGUI) {
                $ShellLocation = Get-Location
                Import-Module (Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1)
                
                #Checking to see if module has been imported. If not abort.
                if (Get-Module ConfigurationManager) {
                        Set-Location &quot;$($Site_Code):\&quot;
                        $DeploymentID = Get-CMSoftwareUpdateDeployment | select AssignmentID, AssignmentName | Out-GridView -OutputMode Single -Title &quot;Select a Deployment and Click OK&quot; | Select -ExpandProperty AssignmentID
                        Set-Location $ShellLocation
                    } else {
                        Write-Error &quot;The SCCM Module wasn't imported successfully. Aborting.&quot;
                        $HasErrors   = $True
                        throw
                }
            }

            if ($DeploymentID) {
                    $DeploymentNameWithID = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter &quot;AssignmentID = $DeploymentID&quot; | select AssignmentID, AssignmentName
                    $DeploymentName = $DeploymentNameWithID.AssignmentName | select -Unique
                } else {
                    Write-Error &quot;A Deployment ID was not specified. Aborting.&quot;
                    $HasErrors   = $True
                    throw   
            }

            if ($Status) {
                   $Output = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter &quot;AssignmentID = $DeploymentID and StatusType = $StatusType&quot; | `
                    select DeviceName, CollectionName, @{Name = 'StatusTime'; Expression = {$_.ConvertToDateTime($_.StatusTime) }}, @{Name = 'Status' ; Expression = {if ($_.StatusType -eq 1) {'Success'} elseif ($_.StatusType -eq 2) {'InProgress'} elseif ($_.StatusType -eq 5) {'Error'} elseif ($_.StatusType -eq 4) {'Unknown'}  }}

                } else {       
                    $Output = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter &quot;AssignmentID = $DeploymentID&quot; | `
                    select DeviceName, CollectionName, @{Name = 'StatusTime'; Expression = {$_.ConvertToDateTime($_.StatusTime) }}, @{Name = 'Status' ; Expression = {if ($_.StatusType -eq 1) {'Success'} elseif ($_.StatusType -eq 2) {'InProgress'} elseif ($_.StatusType -eq 5) {'Error'} elseif ($_.StatusType -eq 4) {'Unknown'}  }}
            }

            if (-not $Output) {
                Write-Error &quot;A Deployment with ID: $($DeploymentID) is not valid. Aborting&quot;
                $HasErrors   = $True
                throw
                
            }

        } catch {
            
        
        } finally {
            if (($HasErrors -eq $false) -and ($Output)) {
                Write-Output &quot;&quot;
                Write-Output &quot;Deployment Name: $DeploymentName&quot;
                Write-Output &quot;Deployment ID:   $DeploymentID&quot;
                Write-Output &quot;&quot;
                Write-Output $Output | Sort-Object Status
            }
        }
    }

    END {}

}

</pre>
<h2>SCCM Software Update Status Video Demo</h2>
<p><iframe title="SCCM Software Updates Status Using Powershell | Windows Updates Deployment Status" width="640" height="360" src="https://www.youtube.com/embed/0scOpLBtrBQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>Finally, If this article helped you out, feel free to subscribe to our <a href="https://www.youtube.com/channel/UC9VnUjmZrNG3ithDZmG-S-g" rel="noopener" target="_blank">Youtube Channel</a> for more awesome sysadmin content. If you want to further your SCCM knowledge, be sure to check out our recommended SCCM books:<br />
&nbsp;<br />
<a href="https://amzn.to/2pSxsvH" rel="noopener" target="_blank">System Center Configuration Manager Current Branch Unleashed</a><br />
<a href="https://amzn.to/2v6PMXt" target="_blank" rel="noopener">Learn SCCM in a Month of Lunches Book</a></p>
<p>The post <a href="https://thesysadminchannel.com/get-sccm-software-update-status-powershell/">Get SCCM Software Update Status using Powershell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/get-sccm-software-update-status-powershell/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1101</post-id>	</item>
	</channel>
</rss>
