Category Archives: PowerShell

Microsoft Updates Extractor PowerShell Script

I wrote this script in order to extract MSP files from CAB files. The purpose of this in my case was to get Office updates that already existed in SCCM and to put their MSP files into the Office installation folder’s “updates” directory in order to have the updates automatically installed when Office is installed.

There are a few scripts online that do this already, but they are much more complicated since they dig in to the SCCM database and download the CAB files from the management point themselves, among other unnecessary (in my case) tasks. I wanted a simpler script that I could run on my own machine rather than the SCCM server for security reasons, so I came up with this PowerShell script that does just that, including renaming the files to match their KB numbers.

The script requires an “msp” folder and an “updates” folder to reside in the same directory as the script. Since this script is run locally, you need to have the CAB files already on your computer. The CAB files from SCCM do not need to be moved out of their respective folders – you can simply copy them as-is from your SCCM updates folder. This means your “updates” folder in the script directory can have folders inside of it, and those folders will have the CAB files. Once complete, the extracted MSP files will all be together in the “msp” folder, ready to copy to your Office installation’s “updates” directory.

Here is the script:

Continue reading

How to Set DNS Suffix and Registration using PowerShell

This very simple PowerShell script can be used to set these options:

  • DNS Suffix for this connection
  • Register this connection’s addresses in DNS
  • Use this connection’s DNS suffix in DNS registration

I’ve seen many questions online on how to use a script to mark the two checkboxes in this “Advanced TCP/IP Settings” window.

So here is the very short and simple PowerShell script:

Continue reading

SCCM Application Detection Method for Network Adapter Configuration

I wrote this PowerShell script for use as an application detection method inside an SCCM application. The SCCM application would set the network adapter configuration if it is not currently configured properly. This company has a special DNS setup for SCCM clients that is different than for non-SCCM clients. Here is the PowerShell code:

Continue reading