Create Software Update Group Tool console extension for ConfigMgr

197_0_3

A few weeks ago I released a PowerShell script that would allow administrators to easily create a Software Update Group containing Software Updates defined between a specified date. This is a functionality that I’ve over the years always used the Search node for, but have thought about turning into a script. With the script released, I started working on a graphical interface for it, better known as a GUI. As of today, I’m please to say that I’m releasing the Create Software Update Group Tool 1.0.0 to the community.

About the console extension

This tool will allow for administrators to quickly and easily create a Software Update Group containing Software Updates determined by a set of Products and Classifications within a specific time span. In order for the tool to function properly, a name with a length of at least 1 character is required, in addition to at least a single Product and Classification. A time span, with a start date default set to 1st of January of the current year and an end date set default to the 31st of December of the current year, is required. The start date of the time span is now allowed to be greater than or equal to the same value as for the end date. By default, the tool will exclude superseded and expired updates, however if wanted, this can be overruled by checking the corresponding check boxes.

Download the console extension

You can download the console extension from the TechNet Gallery.

Install the console extension

There are two ways that you can install this console extension, either by running the Invoke-ToolInstallation.ps1 script that comes in the package, or by manually copying the content to it’s designated location and editing the XML file.

Automated installation

1. Download the zip-file from the TechNet Gallery and unpack it to e.g. C:\Temp\CreateSoftwareUpdateGroup. You should now have the following files in C:\Temp\CreateSoftwareUpdateGroup:

  • CreateSoftwareUpdateGroup.xml
  • Invoke-ToolInstallation.ps1
  • New-CMSoftwareUpdateGroupTool_1.0.0.ps1

2. Close the ConfigMgr console, open an elevated PowerShell console and run the following command to install the tool (Path parameter should point to a location where the script file will be stored, and the SiteServer parameter should be the name of the site server, e.g. a Primary Site server):

.\Invoke-ToolInstallation.ps1 -SiteServer CM01 -Method Install -Path C:\Scripts -Verbose

197_1
3. Re-launch the ConfigMgr console.

Manual installation

1. Download the zip-file from the TechNet Gallery and unpack it to e.g. C:\Temp\CreateSoftwareUpdateGroup. You should now have the following files in C:\Temp\CreateSoftwareUpdateGroup:

  • CreateSoftwareUpdateGroup.xml
  • Invoke-ToolInstallation.ps1
  • New-CMSoftwareUpdateGroupTool_1.0.0.ps1

2. Close the ConfigMgr console and copy New-CMSoftwareUpdateGroupTool_1.0.0.ps1 from C:\Temp\CreateSoftwareUpdateGroup to e.g. C:\Scripts (it’s important that you place it in a non-temporary location, since the CreateSoftwareUpdateGroup.xml file will point to this location for referencing the script).
3. Edit the CreateSoftwareUpdateGroup.xml file on the lines that starts with <Parameters>, amend the parts specified in brackets (#), e.g. from:

-executionpolicy bypass -file #PATH# -SiteServer #SERVER# -ShowProgress -Verbose

to the following:

-executionpolicy bypass -file “C:\Scripts\New-CMSoftwareUpdateGroupTool_1.0.0.ps1” -SiteServer CM01

4. Go to <ConfigMgr console root directory>\XmlStorage\Extensions\Actions. You can get the path by running a PowerShell console and typing:

$env:SMS_ADMIN_UI_PATH

5. Create a directory in the Actions folder called:

  • 23e7a3fe-b0f0-4b24-813a-dc425239f9a2

6. Copy the CreateSoftwareUpdateGroup.xml file from C:\Temp\CreateSoftwareUpdateGroup to the directory recently created.
7. Re-launch the ConfigMgr console.

16 Comments

  1. Aaron

    Thanks for providing the community with a tool such as this. Just some quick feedback since I didn’t see a mention of having to be on the site server to use this tool. I had to add the -computername parameter for both load functions. This is a great start to something that can be very useful.

    Reply
    1. NickolajNickolaj (Post author)

      Hi Aaron,

      You’re most welcome. I’ve corrected the missing -ComputerName parameters on the load functions, not sure I missed those. Anyway, updated zip file has been uploaded to the TechNet Gallery. Thanks for the feedback!

      Regards,
      Nickolaj

      Reply
  2. Duncan McAlynn

    FANTASTIC! Going to include this in my presentation at MMS2016 next week!

    Reply
    1. NickolajNickolaj (Post author)

      Hi Duncan,

      I’m glad that you like the tool! What’s the name of the session that you’re doing? I’d love to watch it afterwards, since I’m not going unfortunately.

      Regards,
      Nickolaj

      Reply
      1. Joshua Delaughter

        I thought they weren’t online?

        Reply
  3. David

    This looks awesome! I received a warning when trying the automated install – WARNING: ConfigMgr console environment variable was not detected.

    Can you point me in the right direction to resolve that?

    thanks,

    David

    Reply
  4. Dave

    Hi
    I get a message that states “Specified search for software updates between “dates” did not return any objects”

    Any ideas?

    Reply
    1. Duncan

      The dates are in DD/MM/YYYY format.

      Reply
  5. Richard

    Am I able to use this on a remote Console? When I click “Create Software Update Group” a PowerShell window opens and closes quickly and nothing else happens.

    Reply
  6. Kristian Persson

    Thanks.
    Great tool.
    I have a wish for an option to deselect already deployed updates.

    Reply
  7. Dave

    Thank you for continuing to work on these cool utilities and sharing them with us!

    Reply
  8. RD

    I installed the tool, when I click on to create software update group, powershell box opens and closes in few seconds, nothing seems to happen after that

    Reply
  9. Duncan McAlynn

    I’m including this in another presentation (webinar) today, 10AM GMT -6. The topic is SCCM as a Security Tool. Check it out: https://t.co/u4MSUVptWu

    Reply
    1. Duncan McAlynn

      In this session, 6x Microsoft MVP and Sr. Solutions Specialist, Duncan McAlynn, will have a discussion with Logun Baker, Senior Systems Administrator for The Huntington National Bank, regarding the challenges of 3rd party application patching within their enterprise and how they have solved those problems

      During the webinar, McAlynn will also be demonstrating how PatchLink natively plugs into the SCCM Admin Console, providing seamless integration into existing patch management workflows without any additional client deployment, infrastructure requirements or added consoles.

      Key Takeaways:

      The webinar is now available for playback online.

      -Hear a real-world case study from a customer that addresses 3rd party patching to protect and defend themselves against malware/randsomware within their enterprise

      -Learn about free add-on tools available from Microsoft and the System Center community to help extend and enhance the core capabilities of SCCM for security compliance monitoring and management

      Reply
  10. CTheSoup

    Same problem as RD. I click to create, powershell box opens, and then closes. Nothing happens.

    Went through the manual steps as well to confirm everything looks right, and it does.

    Reply
    1. Christian Campbell

      Looks like the script is not able to get past:

      $SiteCodeObjects = Get-WmiObject -Namespace “root\SMS” -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction stop

      As a troubleshooting step, I commented that whole section out and specified my site code directly:

      # Determine SiteCode from WMI
      try {
      Write-Verbose -Message “Determining Site Code for Site server: ‘$($SiteServer)'”
      #$SiteCodeObjects = Get-WmiObject -Namespace “root\SMS” -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction stop
      #foreach ($SiteCodeObject in $SiteCodeObjects) {
      # if ($SiteCodeObject.ProviderForLocalSite -eq $true) {
      #$SiteCode = $SiteCodeObject.SiteCode
      $SiteCode = “CM1”
      Write-Verbose -Message “Site Code: $($SiteCode)”
      # }
      #}

      Then I ran into other problems with get-wmi.:

      Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
      At C:\scripts\New-CMSoftwareUpdateGroupTool_1.0.0.ps1:98 char:27
      + $ProductObjects = Get-WmiObject -Namespace “root\SMS\site_$($SiteCode)” …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
      + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

      Exception setting “SelectedIndex”: “InvalidArgument=Value of ‘0’ is not valid for ‘SelectedIndex’.
      Parameter name: SelectedIndex”
      At C:\scripts\New-CMSoftwareUpdateGroupTool_1.0.0.ps1:103 char:9
      + $CBProducts.SelectedIndex = 0
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
      + FullyQualifiedErrorId : ExceptionWhenSetting

      Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
      At C:\scripts\New-CMSoftwareUpdateGroupTool_1.0.0.ps1:108 char:40
      + $UpdateClassificationObjects = Get-WmiObject -Namespace “root\SMS\site_$ …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
      + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

      Exception setting “SelectedIndex”: “InvalidArgument=Value of ‘0’ is not valid for ‘SelectedIndex’.
      Parameter name: SelectedIndex”
      At C:\scripts\New-CMSoftwareUpdateGroupTool_1.0.0.ps1:115 char:9
      + $CBClassifications.SelectedIndex = 0
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
      + FullyQualifiedErrorId : ExceptionWhenSetting

      Any ideas?

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *