Migrating from WSUS to Configuration Manager

Hi Everyone,

This is our first post in a long while, we've had our heads down ramping up on System Center 2012 and helping the first wave of early adopters. As part of some of the work we've done, we found one common scenario where customers are looking to migrate their server patching from WSUS to System Center 2012 Configuration Manager.  For desktop migrations, customer are usually happy to take all updates or the majority of updates and just start fresh.  For servers, they want to be sure that they only thing they pull across is whatever was approved by change and release management. 

To this end, I've written up a couple of sample scripts that help with this migration.  The first script dumps a list of all approvals to all software update groups.  The second script takes this list and create Software Update Groups (or Update Lists if you're using 2007) for each computer group with an update per approval.  The reason these steps were split was to allow for manual review of the exported list.  We found certain updates need clean up prior to importing into WSUS...and some simple Excel clean up does the trick (look for blank fields - these are usually software update titles that have wrapped).

The first script will output the list to console, so you'll need to pipe the script output into another file (powershell.exe script.ps1 > output.csv).  The second script will show a progress bar as it imports, and uses a combination of T-SQL to get CI_IDs from the database and WMI via the provide to create the software update group and add the updates to the group.

NOTE: you may end up with more than 1000 updates in a single update group, something we don't recommended for Configuration Manager, so consider either splitting those groups into separate groups or doing some cleanup/fixup in Excel to split the authorizations being imported.

Both scripts can be found on the TechNet Script Center's Repository:

Hopefully these scripts will make your migration to Configuration Manager a little bit easier.

Keep in mind those that these scripts are sample scripts only and should be tested thoroughly prior to use in any production environments.



Comments (7)

  1. Actually, scratch all my previous issues. It turns out the missing updates were because some products hadn't been selected to sync on the CM12 SUP.

  2. S.Carrilho says:

    Hi KurtS, SCCM integrates with WSUS to leverage its capabilities and provide Patch Management functionality.

    Approval and distribution is then managed from the SCCM Console instead.

  3. I've just tried this out and for the most part it shows potential, but I've got a couple of bugs.

    1. I did an export/import of a small group with 18 updates. On import it only added "2 of 18" updates. Going through the list I can see there are several that are superseded/expired which is fine, but there are another 4 updates that are still valid, and a manual search in CM12 "All Software Updates" finds those updates. What criteria caused it to fail to match these updates? For larger lists there are a lot more updates not included, and manually going through to determine if they are expired or not won't be fun.

    2. I deleted the CM12 Update group that was created on the first run and ran the script again. While it did eventually create the group and only add the same two updates, it spent the first "99%" of the progress throwing up the following error many many times:

    Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: ''  Key being added: ''"

    At \servername.domainsource$WSUSApprovalsImportApprovals.ps1:37 char:9

    +         $sortedApprovals[$Approval.ComputerGroupName].Add($Approval.UpdateGUID,  …

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

       + FullyQualifiedErrorId : ArgumentException

  4. Actually, never mind about that second error, it looks like it was an error in my import file after I edited/exported it using Excel.

  5. Marcus Wessberg says:

    Sweet. Now I can remove my old WSUS server.

  6. KurtS says:

    Is System Center Configuration manager built on top of WSUS?

  7. shane says:

    Hi Kurt, it appears the export script lists all updates, or am I incorrect? Would like to see which updates we have “declined” or “approved”, etc.

Skip to main content