Inventory Local Administrator Privileges with PowerShell and ConfigMgr

Any security-conscious enterprise will want to have visibility of which users have local administrator privilege on any given system, and if you are an SCCM administrator then the job of gathering this information will likely be handed to you! However, this task may not be as simple as it seems. Gathering the membership of the … Continue reading Inventory Local Administrator Privileges with PowerShell and ConfigMgr

Find the Compliance State for Software Updates on Remote Computers with PowerShell

Since the recent WannaCrypt ransomware attacks, many organisations have wanted to get the patch status of their systems to see if they are protected. Several reports and SQL queries for ConfigMgr were quickly posted online to help enterprises identify at-risk machines. But what for those who don't use ConfigMgr, or what if you want to … Continue reading Find the Compliance State for Software Updates on Remote Computers with PowerShell

Find the Full Windows Build Number with PowerShell

Much to my surprise I discovered that the full build number for a Windows OS is not stored in WMI in the usual Win32_OperatingSystem class. In Windows 10 at least, the full build number containing the "UBR", or essentially the CU patch level of the build, is a useful piece of information. Open Settings > … Continue reading Find the Full Windows Build Number with PowerShell

Backup and Restore ConfigMgr Site Maintenance Task Settings with PowerShell

According to the official Microsoft documentation, when upgrading to System Center Configuration Manager (current branch), it is recommended to disable any site maintenance tasks that could run during the upgrade (as they can cause the upgrade to fail), and to make a record of the task schedules for any disabled tasks: Before you disable a … Continue reading Backup and Restore ConfigMgr Site Maintenance Task Settings with PowerShell

PowerShell Custom Class for Querying a SQL Server

Here is a handy custom class I created for PowerShell 5+ that can query an SQL database. The class creates a SQL connection using the System.Data.SqlClient.SqlConnection class in .Net, and gives you full access to this object for information or to manipulate parameters. The class can also query the list of tables and views available in … Continue reading PowerShell Custom Class for Querying a SQL Server

New Free Tool: ConfigMgr Remote Compliance

Today I released a new free tool for ConfigMgr administrators and support staff. ConfigMgr Remote Compliance can be used to view, evaluate and report on System Center Configuration Manager Compliance Baselines on a remote computer. It provides similar functionality to the Configurations tab of the Configuration Manager Control Panel, but for remote computers. It is … Continue reading New Free Tool: ConfigMgr Remote Compliance

Deploying Custom Microsoft Office Templates with System Center Configuration Manager

Some time ago a wrote a blog describing a way to deploy custom templates for Microsoft Office applications using SCCM Compliance Settings. Since then, I have re-written the solution into something much more manageable as the previous incarnation was not very clearly defined in how to update templates, and involved some considerable admin overhead. This … Continue reading Deploying Custom Microsoft Office Templates with System Center Configuration Manager

Export / Backup Compliance Setting Scripts with PowerShell

In my SCCM environment I have a number of Compliance Settings that use custom scripts for discovery and remediation, and recently it dawned on me that a lot of time has been spent on these and it would be good to create a backup of those scripts. It would also be useful to be able … Continue reading Export / Backup Compliance Setting Scripts with PowerShell

PowerShell Tip! Create Background Jobs with a Custom Class

PowerShell 5 introduced the capability to create custom classes. Classes are a convenient way to create an object with your own custom definition, and can include properties and methods. There could be many potential use cases for such a custom class, but here's one that is handy: background jobs. PowerShell comes with some cmdlets for … Continue reading PowerShell Tip! Create Background Jobs with a Custom Class

Automatically Set SQL MaxServerMemory on Cluster Failover with PowerShell

On a two-node Windows Failover Cluster, I have two SQL instances installed. Each instance runs on its own node in the cluster, so that it can make maximum use of the available memory on that server. However, when a failover occurs, it is necessary to reduce the maximum server memory setting for both instances, so … Continue reading Automatically Set SQL MaxServerMemory on Cluster Failover with PowerShell