Intro - 10 Things You Need As An Enterprise Scripter

Introduction The main difference between enterprise level scripting and non-enterprise level scripting is professionalism. This is a simple truth. You may have the best code in the world and it may have the potential to save millions of dollars but without the proper attention to the small and large details it is most likely a script that will live and die with you. It won’t even be a foot note in the company’s internal wiki. Read more →

Pester - TestGroups Stack Corrupted

Exception calling "LeaveTestGroup" with "2" argument(s): "TestGroups stack corrupted: Expected name/hint of '$name','$hint'.. Found '[context]','Context'." $pester.LeaveTestGroup($testScript.Path, 'Script') This is caused when your function is calling “exit” while testing. Or at least it did in my case. Properly mock whatever is calling exit or find a way to not use exit! Look at the source code here for hints as to what is actually happening. Pester makes sure it is still in the context it started as before leaving a test group. Read more →

Import-SMAModule fails!

When using Import-SMAModule you get a wild error. Import-SMAModule : Could not import the module []: System.Data.Services.DataServiceClientException: The underlying connection was closed: An unexpected error occured on a receive. ---> ... Make sure the module you are importing is a zipped folder with the proper module files! This is clearly documented. :) Read more →

Uninstall the OMS Agent

Just keeping this here for future use. This will remove the OMS client / Microsoft Management Agent. Cheers! $App = Get-WmiObject -Query 'select * from win32_product where ` IdentifyingNumber = "{742D699D-56EB-49CC-A04A-317DE01F31CD}"' $App.Uninstall() Read more →

Download Office 2016 Updates Easier

I am a firm believer of keeping your Office installation source fully patched. This can reduce your deployment time and increase security while improving the end user experience. I have written a simple script that downloads all required Office 2016 x86 software updates using a list of updates I have published and data pulled from ConfigMgr based on entries in that list. I have a previous blog post on how to do this using ConfigMgr to search for available software updates download them to a deployment package, remove any problem updates and then extract the MSP files. Read more →

Removing ConfigMgr Drivers with missing source files

You can find the drivers with missing source files removal script here. This is the second article in a series a driver articles. You can find part 1 here. Driver management with ConfigMgr can be a bear at times. Without some attention to detail towards organizing your driver source locations it is not uncommon for driver source files to be deleted before the driver is removed from ConfigMgr, by accident or otherwise. Read more →

Import boot image drivers from existing boot image

With the new “Current Branch” model of ConfigMgr and Windows 10 we can expect a faster release cycle of the ADK, which means new boot images pretty regularly! Creating new boot media is really simple. However, reimporting all of your required drivers into that boot image can be a real chore. Here is a script that identifies drivers in a source boot image and imports them into a destination boot image. Read more →

Maintaining Your Office 2016 Installation Source

Deploying an updated Office installation has always been an annoyance of mine. It is ideal to be able to deploy a fully updated Office installation so you don’t have to run a software update scan and then wait for all the office patches to download and install. Having to install less software updates can reduce your deployment or build and capture times significantly. To avoid all of this legacy overhead, use Office 365 Click to Run edition. Read more →

Enable Isolated User Mode in Windows 10

UPDATE This for any Windows 10 release pre 1607 (Anniversary Edition). With 1607 this functionality is baked into Hyper-V. You need to enable Isolated User Mode in Windows 10 if you want to, among other things, utilize the virtual TPM chip in generation 2 virtual machines. If you try to start a gen 2 virtual machine with the TPM chip enabled but without Isolated User Mode enabled you get this error message: Read more →