Category Archives: SCCM

Automating the Removal of Old Office Versions and Upgrade to 2016

The end-of-life for the click-to-run version of Office 2013 is quickly approaching (February 28th, 2017). This is a quick reference on how to automate the deployment of Office 2016 to your environment, while also fulfilling the prerequisite of removing any previous versions of Office (including 2013).

Step 1 – Automate the uninstall of previous versions of Office

Installing Office 2016 will not do this on its own, unfortunately. There are several ways to uninstall previous Office versions, but the most reliable I have found in my experience is to use the available OffScrub scripts from Microsoft, which can be extracted from the EasyFix uninstallers for Office 2003, 2007, and 2010. For Office 2013 and 2016, a separate script can be run to automate the uninstall using O15CTRRemove.diagcab. All scripts can be combined and run from a single package/program using SCCM. There is a great guide available from Jay Michaud on how to do all of this: https://www.deploymentmadscientist.com/2016/02/08/deploying-microsoft-office-2016-removing-old-versions/

Step 2 – Automate the installation of Office 2016

There are several guides on how to use the Office 2016 Deployment Tool, which allows you to download the Office 365 client installation files and package them up for deployment. This reference guide contains all available commands to customize the XML file which controls how Office 2016 is downloaded, installed, and configured. The final step is to package it up for deployment in SCCM. All of these steps are outlined here: https://www.systemcenterdudes.com/sccm-2012-office-2016-deployment/.

Step 3 – Deploy both packages simultaneously with Configuration Manager

Of course, you will want to run step 1 and step 2 together to minimize the amount of time that users are without Office on their systems. You can deploy sequential applications in SCCM by using software packages (setting the uninstall program to always run first in the install program properties), by using software applications (setting a software dependency for the uninstall script to run prior to install), or by using a task sequence that contains all of the steps (task sequences can do more than just deploy an OS, after all). As always (and especially with multi-step software deployments), be sure to test deployment with a few pilot systems before running it for all of production.

Microsoft has done a good job of making Office settings/profiles migrate easily to new versions, and the same is true for 2016. Outlook will automatically upgrade any existing mail profiles when run for the first time and should not require any special configuration from the user.

SQL Query to Export All SCCM Maintenance Windows

Maintenance windows tend to be illusive in Configuration Manager, especially in large environments with multiple admins. A common request that I receive from my customers is to “retrieve all of maintenance windows.” There isn’t a great report for this or an easy way to do this with PowerShell (yet). The easiest method I’ve found to do this with the most detailed information is through a simple SQL Query on the CM database.

query

SELECT c.Name, c.Comment,SW.IsEnabled, SW.CollectionID, c.MemberCount, SW.Description, SW.StartTime, SW.Duration

FROM v_ServiceWindow SW

JOIN v_Collection C ON C.CollectionID = SW.CollectionID

ORDER BY c.Name

The results of this query will give you the Name, Comments, Date/Time/Frequency, and Duration for every maintenance window in your environment, as seen below.

queryresults

 

In-Console Updates Stuck Installing in ConfigMgr: How To Fix It

Disclosure: do not follow these steps if you do not know what you’re doing. They should only be used as a last resort. Use with caution.

I’ve had a couple different SCCM environments get stuck during update installations that have come down through the new Updates and Servicing feature in the current branch builds. Typically, this does not happen but I have yet to determine the root cause. It’s very important to note that updates that come down through the console can take a significant amount of time to install and you should be patient. I would recommend waiting several hours for them to complete while checking dmpdownloader.log for the real-time status. You should also close and reopen the SCCM console before taking any action – it may just be waiting for you to relaunch the console to install a newer version of the console.

This fix will help you if your hotfix updates are stuck in the Installing state, like so:

su1

There were no actions available to resolve the state of these hotfixes from the SCCM console, and restarting the SMS_EXECUTIVE service and CONFIGURATION_MANAGER_UPDATE services and the server itself did not help in this case, either. It actually looked like the hotfixes successfully applied weeks ago, yet the state had not been updated. The workaround for this was to change the status of these hotfixes directly in the CM database, which should be considered a last resort in any scenario. There’s a simple SQL query to do this from SQL Server Management Studio, which originated from this TechNet article from an earlier Technical Preview version:

EXEC spCMUSetUpdatePackageState N'd26be618-1df5-4680-a65f-03cec6abc7ec', 262146, N''

You will need to modify the above query with the metadata string from the corresponding update. To find which string to use, go to your SCCM installation directory open the EasySetupPayload folder that serves as the cache for in-console updates, and find the folder name for the hotfix that is stuck. In this case, I ran the query twice – once for each hotfix that was stuck installing.

su2

After executing the query and refreshing the SCCM console, the status was cleared immediately and I was able to proceed with the install the latest branch release.

su3

 

WSUS Synchronization Failures in SCCM with HTTP Status 503

I ran into a new error today during a WSUS synchronization for SCCM Software Updates. Synchronizations had been running fine for a while, but it would fail after running for an extended amount of time. The error was easy to find in the wsnycmgr.log file in the Configuration Manager logs:

wsus

Usually when synchronization fails, it does so immediately due to WSUS not being configured properly, WSUS missing a hotfix, or not being mapped to the proper ports in IIS.

After a bit of research, I found a very useful article saying that the WSUS Application Pool in IIS may be running out of memory during synchronization. To help identify this issue, you will see the 503 error in wsyncmgr.log, and the Application pool for WSUS will be stopped in IIS when it fails:

image1_thumb_4c714962

To fix the issue, you can set the Private Memory Limit to 4000000 or 8000000 as recommended in the article and restart the application pool. You can then trigger a manual synchronization and monitor the log again.

image6_2e26926c

So far in testing this change in other environments, it appears that it can significantly improve performance and cut down on those sync times as well.

Which Version of the ADK should I use with SCCM?

With the new release cycle for Configuration Manager, it can be difficult to know which version of the Windows ADK to use when upgrading to new releases. To further complicate the issue, each time you upgrade the ADK on the server used by SCCM, you must upgrade boot images used for OS deployment to be able to edit them going forward (the old ones are preserved but are read-only after you upgrade the ADK).

There’s a recent blog post that was really good at answering which versions of SCCM, the ADK, and Windows 10 are compatible with each other. In short, if you want to deploy the latest branch of Windows 10 (the Anniversary update), you need the latest version of the ADK installed. To use the latest version of the ADK, you must be using either the 1602 or 1606 build of SCCM.

Here’s a compatibility chart from that post, but be sure to check out the full post as it has more info:

adk