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.

Nickolaj Andersen
Principal Consultant and Enterprise Mobility MVP. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows deployments and Automation. In 2015 Nickolaj was awarded as PowerShell Hero by the community for his script and tools contributions. Author of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService and a frequent speaker at user groups.

(404)

comments
  • Aaron
    Posted at 17:39 May 11, 2016
    Aaron
    Reply
    Author

    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.

    • Nickolaj
      Posted at 21:59 May 11, 2016
      Nickolaj
      Reply
      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

  • Duncan McAlynn
    Posted at 03:22 May 12, 2016
    Duncan McAlynn
    Reply
    Author

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

    • Nickolaj
      Posted at 12:41 May 12, 2016
      Nickolaj
      Reply
      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

  • David
    Posted at 14:21 May 12, 2016
    David
    Reply
    Author

    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

  • Dave
    Posted at 15:33 May 12, 2016
    Dave
    Reply
    Author

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

    Any ideas?

    • Duncan
      Posted at 14:30 June 23, 2016
      Duncan
      Reply
      Author

      The dates are in DD/MM/YYYY format.

  • Richard
    Posted at 15:53 May 12, 2016
    Richard
    Reply
    Author

    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.

  • Kristian Persson
    Posted at 12:53 June 1, 2016
    Kristian Persson
    Reply
    Author

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

  • Dave
    Posted at 18:33 June 1, 2016
    Dave
    Reply
    Author

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

  • RD
    Posted at 21:21 June 22, 2016
    RD
    Reply
    Author

    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

  • Duncan McAlynn
    Posted at 14:28 June 23, 2016
    Duncan McAlynn
    Reply
    Author

    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

    • Duncan McAlynn
      Posted at 14:24 June 27, 2016
      Duncan McAlynn
      Reply
      Author

      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

  • CTheSoup
    Posted at 16:33 June 24, 2016
    CTheSoup
    Reply
    Author

    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.

    • Christian Campbell
      Posted at 16:53 June 24, 2016
      Christian Campbell
      Reply
      Author

      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?

  • Bill Eckles
    Posted at 22:13 January 10, 2017
    Bill Eckles
    Reply
    Author

    Hi Nickolaj,

    Thank you for providing ease to our jobs.

    How would we uninstall this without removing the Add Software Update Group option in the Console?

    I have used .\Invoke-ToolInstallation.ps1 -SiteServer CM01 -Method uninstall -Path C:\Scripts -Verbose and it removes the option totally.

    Thank you for any help.

  • Leave a Reply