I came across a code snippet by Mick Pletcher () that you can add to the end of a compliance item script to kick off the evaluation of a baseline. I took that and added a parameter to it so you can use it as a ConfigMgr Run Script. It look like a lot of code but 90% is just documentation.
Continue reading “ConfigMgr Run Script – Kickoff Compliance Baseline Check”Category: PowerShell
ConfigMgr PowerShell Script – Create Collections off Compliance Settings Configuration Items
The script uses Get-CMConfigurationItem cmdlet to get a list of LocalizedDisplayNames of Compliance Setting CIs and then runs a Foreach to create three collections based using the LocalizedDisplayName. Parameters specify the CM Site Code, Limiting Collection collection ID, and the CI Name. It does a check to see if a collection exists beofre creating which is also a self repair feature as a deleted collection will be recreated.
Continue reading “ConfigMgr PowerShell Script – Create Collections off Compliance Settings Configuration Items”ConfigMgr Run Script – Set Service State
As you can tell, many of my script posts occur after something was needed at work and I ended scripting it. This time we needed to alter the startup of a service on a group of systems. I wrote this PowerShell script to set the startup type and status of a specified service. It does require three parameters: service name, startup type desired, and desired status.
Continue reading “ConfigMgr Run Script – Set Service State”ConfigMgr Log Collector Run Script
In most environment I have worked in, I have not had access or easy access to some systems I was expected to troubleshoot ConfigMgr issues on especially servers. I would normally have to ask for someone to send me logs and half the time needed to explain where to find that logs. I wrote a quick ConfigMgr Run Script that I can target against a system or collection and no longer have to ask for logs because the script will get them for me.
Continue reading “ConfigMgr Log Collector Run Script”