System Center Configuration Manager (SCCM) is a client-managing tool that is primarily being used in enterprise companies with thousands of clients. Microsoft has started to make the transition from the traditional on-premises model, moving on to hybrid, up to cloud-only, scenarios. At first, this was initiated with Intune and Hybrid management. Nowadays, things are moving on to Co-management and Intune, on Azure scenarios. Due to Windows as a Service, which we also introduced in the Evergreen section in Chapter 7, Understanding PowerShell Security, SCCM is also updated very frequently.
First, you have to set up the connection to your SCCM site server. From script, you have to import the SCCM PowerShell module, which can be accomplished as follows:
#Importing cmdlets from SCCM on the SCCM site server
Import-Module (Join-Path $(Split-Path...