Close Menu
    Facebook X (Twitter) Instagram
    Trending
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    • Workplace Ninja User Group Denmark February Meetup
    • Workplace Ninja User Group Denmark Meetup – May 2022
    • Workplace Ninja User Group Denmark Meetup – April 2022
    • Speaking at Modern Endpoint Management Summit 2022
    • Speaking at Nordic Virtual Summit 2022 – 3nd Edition
    • CoLabora Recordings – January 2022
    RONNIPEDERSEN.COM
    • Home
    • Enterprise Mobility
      • Configuration Manager
      • Identity and Access
      • Information Protection
      • Intune
    • Cloud and Data Center
      • Data Center Management
      • Group Policy
      • Enterprise Security
      • Hyper-V
      • PowerShell
    • Guides
    • Webcasts
    • Links
    • About
      • Contact me
      • Disclaimer
    RONNIPEDERSEN.COM
    You are at:Home»Enterprise Mobility»Configuration Manager»Creating Collections for CU Updates using PowerShell

    Creating Collections for CU Updates using PowerShell

    7
    By Ronni Pedersen on February 2, 2015 Configuration Manager, Enterprise Mobility, PowerShell

    When upgrading the System Center Configuration Manager (SCCM) client to a new version, most customers would prefer to create new collections for this task.

    As a cosultant I create alot of these “ad-hoc” collections every time I visit a customer, so I’ve created a small libary of PowerShell scripts that will help me create these collections really fast when I need them.

    Here is a simple PowerShell script that will create 2 kinds of collections that will help you for this specific task.

    1. #CLI – Client Version; That will have all clients with a specific client version.
    2. #CU – Cumulative Updates; That will have all clients that requires a specific CU update.

    Download the PowerShell script here:
    https://gallery.technet.microsoft.com/SCCM-Creating-Collections-f334c7f0

    I’ll try update the script everythime a new update (CU or Service Pack) are released.

    Update: The script has now (3/2-2015) been updated to support SCCM 2012 R2 CU4.

    After you run the script you should see the following collections in the console:

    image

    Enjoy.

    +Ronni Pedersen

    • Tweet
    • Share 0
    • +1
    • LinkedIn 0

    Related

    Ronni Pedersen
    • Website
    • Facebook
    • X (Twitter)
    • LinkedIn

    My name is Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Enterprise Client Management solutions, based on technologies like AzureAD, Intune, EMS and System Center Configuration Manager. I'm is also a Microsoft Certified Trainer and Microsoft MVP in Enterprise Mobility.

    Related Posts

    Speaking at Nordic Virtual Summit

    Workplace Ninja User Group Denmark February Meetup

    Speaking at Modern Endpoint Management Summit 2022

    7 Comments

    1. Hoppy Shaw on February 2, 2015 20:19

      Very handy as we are getting ready to upgrade. Thanks!

      Reply
      • Ronni Pedersen on February 3, 2015 01:26

        Glad you liked them…
        FYI: CU4 was relased a few sec. ago, so if you download the script again, it has now been updated to support SCCM 2012 R2 CU4.

        Reply
    2. Chase Roth on February 28, 2015 16:10

      Love this script! Thank you Ronni.
      If I might I’d like to suggest a modification…add the following line of code so we don’t need to modify the site code name in the script. This will find the name of the site and set-location to it.

      Set-Location $($(Get-PSDrive -PSProvider CMSite).Name + ‘:’)

      Thanks for considering it.

      Reply
      • Ronni Pedersen on March 2, 2015 17:18

        Hi Chase,

        Thanks for the tip. It’s a great tip!

        I wanted to change the script, but then I change my mind.
        The reason is that I’ve got customers with multiple site (dev/test/prod) within the same Active Directory.
        So to keep it simple, I’ll stick with the hardcoded site code.

        But thanks for the input.

        -Ronni

        Reply
    3. Daren on March 11, 2015 18:34

      Thank you for the helpful info on this page as well as on the rest of your site. I have used your resources a number of times to various things, so THANK YOU!

      When I attempt to run this script from my Primary Site server as well as from my tech workstation, I get a strange error which I am not sure how to fix. Here it is:

      “CD : Cannot find drive. A drive with the name ‘P02’ does not exist.”

      I am not sure what to change this drive letter to to correct this issue. The rest of of the script fails entirely because it cannot location this location, of course.

      Thanks for any info you might be able to provide!

      Reply
      • Ronni Pedersen on March 11, 2015 18:57

        Hi Daren,

        P02 is the SCCM SiteCode.
        You need to change that to match your site code.

        Reply
        • Daren on March 11, 2015 19:10

          I knew it would be simple, thanks for the speedy reply!!

          Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Follow
    APENTO

    Follow APENTO here:

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    About
    My name i s Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Endpoint Management and Security, based on Microsoft technologies. I'm also a Microsoft Certified Trainer and a dual Microsoft MVP in both Security and Windows.
    Recent Posts
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    • Workplace Ninja User Group Denmark February Meetup
    • Workplace Ninja User Group Denmark Meetup – May 2022
    • Workplace Ninja User Group Denmark Meetup – April 2022
    Archives
    TOP POSTS
    • Setting OSDComputerName using CustomSettings.ini
    • Find the TimeZoneName for your SCCM/MDT Deployments
    • SCCM 2012 R2: Where is the SMSTS.log located?
    • SCCM: Failed to Get Client Identity (80004005)
    • Updating the Windows Update Agent on Windows 7 clients
    RECENT COMMENTS
    • Sebi on Prepare for Co-Management: Migrate Intune Devices without user affinity
    • Vadim P on SCCM: Failed to Get Client Identity (80004005)
    • TM on Active Directory Based Activation in an multi domain environment
    • unkown on Setting OSDComputerName using CustomSettings.ini
    • TJ Scott on Setting OSDComputerName using CustomSettings.ini
    DISCLAIMER
    The content on this website is presented "as-is" with no guarantees. The use of scripts from this website is at your own risk. Always test before putting something in production! Opinions expressed are my own.
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.