My Profile Photo

duffney.io


DevOps Engineer | Pluralsight Author | Speaker | Blogger | PowerShell Advocate


  1. Change System Center Configuration Manager Client Cache Size with PowerShell

    Applies to: Windows PowerShell 3.0+ The only way to set the Configuration Manager client cache size is by specifying it at installation. This was troublesome for me as I left it the default 5GB at install, but then was requested to deploy some AutoDesk packages that where of course over that 5GB limit. Knowing I could not rely on the end user to change their cache size, I knew I had to find a better...…


  2. Fix 0KB Driver Packages in System Cennter Configuration Manager 2012 with PowerShell

    Applies to: Windows PowerShell 3.0+, SCCM There is a known issue with System Center Configuration Manager 2012, where after importing or creating a driver package the size could be 0KB. The problem is, it causes a task sequence that is using the driver package to fail. Since the size is 0, it thinks that the driver package isn’t distributed to the distribution points. To resolve this you must perform the following actions in the console....…


  3. Run CMD Commands within a PowerShell Script

    Applies to: Windows PowerShell 2.0+ Sometimes when you enter commands into PowerShell they don’t execute the same way as they would in the command prompt. I ran into this issue with an uninstall string for a security software called Cylance Protect. The uninstall string looks like this: msiexec /Lvx* c:\Temp\MsiUnInstall.log /x {2E64FC5C-9286-4A31-916B-0D8AE4B22954} /qn When I executed it within the command prompt it ran as expected, however when executed in PowerShell it pulled up the msi...…


  4. Remove Blank Lines from Foreach Results

    Applies to: Windows PowerShell 3.0, Windows PowerShell 4.0, Windows PowerShell 5.0 While creating a script that gathers all the product codes of .MSI files in a directory, I discovered a problem. The variable that I had place them in was generating blank lines between my variables. Below is an example of the problem After not being able to Google the correct combination of works, I quickly posted this problem to the Spiceworks community to help,...…


  5. Compare Active Directory and System Center Configuration Manager Active Devices

    Applies to: Windows PowerShell 3.0+, SCCM The purpose of this script is to check a list of computers provided by a text file against Active Directory and System Center Configuration Manager to determine whether or not they are active. You might use this script if you manage System Center Configuration Manager and frequently need to validate devices that are active in both Active Directory and System Center Configuration Manager. To use this script we’ll need...…