GivingSomethingBack Blog

With so many people working from home these days, handling devices that are connected via VPN has become challenging for many companies. Looking at this from the ConfigMgr perspective, there are several aspects that we might want to do differently, depending on if a device is connected via VPN or...

In my blog post “Invoke a remote command without WinRM, psexec or similar – Access administrative shares even if they have been removed” I demonstrated how to use WMI to execute a command on a remote computer. The task was pretty simplistic as I only had to create a share....

In one of my last posts I mentioned that for me the CIM CmdLets have been faster than the WMI CmdLets. I referred mainly to my personal impression working with these CmdLets for quite some time on a pretty large array of different servers and tasks and supported this statement...

In my last post, I explained how to solve one of the stumbling blocks when working with the PowerShell CIM CmdLets. The second problem, which was both pretty nasty as it basically prevented me from using the CIM CmdLets properly for SCCM and pretty time consuming, as it was hard...

In my last post, I explained a bit, why I changed over to the “new” PowerShell CIM CmdLets. However as mentioned, there were a few painpoints that I struggled with. The Problem One of them was to work with embedded classes. These are classes that are “embedded” into other classes....

Some time ago I moved most of my WMI related work from the “deprecated” PowerShell WMI CmdLets (Get-WMIObject, Invoke-WMIMethod, etc.) over to the “new” CIM CmdLets (Get-CimInstance, Invoke-CimMethod, etc …). It wasn’t really because they are “deprecated”. Microsoft might treat them this way, but they will for sure be around...

In the last blog post I showed a script that would allow you to import a Task Sequence from an xml file as the ones being created by the Task Sequence monitoring script (see https://maikkoster.com/versioning-monitoring-sccm-task-sequences/ for details). As this covered a need that I basically created myself by publishing a...

The Problem One of my probably mostly used scripts is a VBScript that monitors for any changes on Task Sequences in SCCM and exports a copy for backup purposes when an updated task sequence is saved. Please see https://maikkoster.com/versioning-monitoring-sccm-task-sequences-update-for-sccm-2012/ for further details about the script itself. Even it has been...

The Problem Organizing code in modules and re-using the same functions in different scripts is a common and recommended practice when working with PowerShell. I do have a lot of different modules created and grown over time that cover different aspects and that I use regularly in my daily work....

Recently I ran into a situation, where I had to check a few log files on some remote computers and also needed to execute some commands to fix an issue. However, due to reasons I’m not going to enlarge on, all administrative shares had been removed. So by this, no...

In my last post, I demonstrated how to call the InitiateClientOperation method from the SMS_ClientOperation WMI class to run a SCEP Full Scan. However, this call itself is pretty limited for daily administration, as it requires “internal” information like the CollectionID, ResourceID or some TypeID for the Operation itself. Probably...

Lets assume you have a security device that detects computers possibly infected by some malware. Wouldn’t it be nice to automatically initiate some immediate action for remediation? I recently had such a requirement where we wanted to automatically start a definition download and full scan on those computers. It’s pretty...

I’m currently updating/rewriting a whole slew of PowerShell scripts that I have created over the last couple years into something less “hacky”. As scripts grow larger they become harder to read or understand the logic. A typical and recommended approach is to break it up and separate certain functionality or...