Categories
SCCM / MECM

2012 R2 no more

Here are tips for upgrading your Windows Server 2012 R2 boxes, specifically SCCM.

1. Snapshot/Backup your VM.

2. Apply your Windows and SQL updates.

3. According to Microsoft, Windows Server 2012 R2 can be upgraded directly to Windows Server 2019. From 2019 you can upgrade to Windows Server 2022. Some claim you can go directly from Windows Server 2012 R2 to 2022, but I’m sticking to Microsoft’s recommendation when it comes to in-place upgrades.
https://learn.microsoft.com/en-us/mem/configmgr/core/servers/manage/upgrade-on-premises-infrastructure

4. Uninstall System Center Endpoint Protection prior to upgrading. Windows Defender is included in later Windows Server releases.

5. Uninstall Windows Management Framework 5.X (KB3191565) prior to upgrading to avoid WMI repository.

6. Do not uninstall WSUS role or your Software Update Point. Instead, after the upgrade run WSUSUTIL Postinstall

“C:\Program Files\Update Services\Tools\wsusutil.exe” postinstall SQL_INSTANCE_NAME=”SQLSERVER\SQLINSTANCE” CONTENT_DIR=E:\WSUS

7. After upgrade is complete, install Windows updates.

8. Check SCCM services
9. Run a site reset


If upgrade fails because corrupted component store
Dism restorehealth from install media instead of SxS

One issue I ran into was the upgrade failing even after dism restorehealth repaired successfully. Turned out AppRepository was corrupted. This was confirmed by simply running Get-AppxPackage.

I fixed this by running command prompt as system (Psexec.exe -s -i cmd.exe) and deleting the files within %SYSTEMDRIVE%\ProgramData\Microsoft\Windows\AppRepository. Simply reboot and Windows will rebuild the AppRepository database files.