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 →

Git and the PowerShell prompt

There is lots of information out there on using Posh-Git. This is nothing new, its just a little helper for me since I have been recently been shuffling through workstations at an alarming rate. If it is useful for you as well, stellar! Install GIT From an elevated powershell prompt: Install-Package posh-git Modify your profile for PowerShell and PowerShell_ISE Reference for PowerShell profiles Read more →

Nested PowerShell Modules

If you are curious about how to import a PowerShell module that has dependencies on other modules this can be done with the module manifest file (PSD1). You can do some pretty wild stuff with a PowerShell Module Manifest file. For starters here is a great outline how that file works with some decent examples. Here is an example of how to have nested PowerShell modules. The nested module in this case being a C# compiled . Read more →

Azure Spending Limit Reached

I have pushed my cloud first ways too far and have just exhausted my azure credits and my subscription has been deactivated! I went to the Azure management portal (legacy) and updated my account and removed the spending limit. But my account is still not activated! Ahhh!! ReadOnlyDisabledSubscription: The subscription [GUID] is disabled and therefore marked as read only. You cannot perform any write actions on this subscription until it is re-enabled. Read more →

Invoke-Command Example

I use this CmdLet all the time. It is really the bees knees as far as remote management of devices go. Here is an example to use as reference. $ComputerName = "SERVER01" $RemoteSession = New-PSSession -ComputerName $ComputerName #return a scalar value $results = Invoke-Command -Session $remoteSession -ScriptBlock { param($variablePassedToRemoteSession) $output = get-process $variablePassedToRemoteSession Write-output $output } -ArgumentList $variablePassedIn $results | Get-Member #return a more complex object $results = Invoke-Command -Session $remoteSession -ScriptBlock { param($variablePassedToRemoteSession) $process = Get-Process $variablePassedToRemoteSession Write-Output "Handles", $process. Read more →

Creating classes in C# for PowerShell use

Sometimes it is just easier to write compiled code! This is a small example of how to create a custom object in C#and then use it. C# Code Sample using System.Text; public class Beer { public string Name; public string Type; public Beer(string NameIn, string TypeIn) { this.Name = NameIn; this.Type = TypeIn; } } Create a folder with the same name as the dll that gets compiled and place the newly created dll in this folder. Read more →

PowerShell v5 has class!

PowerShell version 5.0 added the ability to use the class designator in scripts. Don Jones has a good write up on it. This allows for live .NET framework class creation. This is a REALLY nice feature. There were a few ways to create custom objects in PowerShell before this, including specifying c# code directly in the script, using add-member and other ways. These all worked fine, but each has rather annoying limitations or overhead. Read more →

Remotely managing a WDS server with PowerShell or WDSUTIL

If you try to run any of the CmdLets in the WDS PowerShell cmdlets remotely via Invoke-Command, Enter-PSSession, CIMSession, or even PSEXEC it will fail with the error: _The operation being requested was not performed because the user has not been authenticated. If this is happening to you, you are screwed. Kind of. Remotely managing an AD Integrated WDS is simply impossible as far as I can tell. To fix this is you have to remove the WDS role and then add it again. Read more →