Send Key combinations to a VM through the Host OS with WMI

Hi, Recently I posted an article on how to send key strokes and text to a Hyper-V virtual machine through use of WMI on the host computer. Since that article was written I’ve learned of a way to send any key combinations through to the VM. For example if you… Read more »

Adding Custom Properties to the MDT Database – Extending the Schema

Heyo, There’s been a couple of occasions where we’ve needed to store additional settings in the MDT Database, for example storing AD groups, or the OU that the computer was last in before rebuilding. The process is straight forward, using SQL Server Management Studio, open up the MDT Database, edit… Read more »

List MSI paths from Software Installation Policies

Hey, We have 1000’s of MSI’s assigned through group policy and often need to work with the file paths in PowerShell, here’s a function that returns the file path of the MSI from the Software Installation GPO.

This function will return the MSI path and MST path. It will… Read more »

Invoke a command using VB.Net and WMI

      No Comments on Invoke a command using VB.Net and WMI

Hi Again, I’ve been looking into different ways of invoking commands on remote machines. Here’s one that can be used in VB.NET by using WMI. First add a reference to System.Management and reference it at the start of your project:

Then add the guts, the code that calls WMI… Read more »

Running a PowerShell Command from the Command Line

Hi, Today I found myself needing to run a PowerShell command from the command line. I ran powershell /? and had a look at the switches and there is a -Command switch. My first attempt to use the switch looked like:

The above doesn’t work – It gives an… Read more »

Recursively check if a User/Computer is a member of an AD Group with PowerShell 2.0

Hi Again, Recently we’ve been fed up with Deployed Printer Connections through Group Policy and have decided to map printers using a PowerShell logon script. We wanted printer additions, removals and defaults to be based on AD groups, and for the script to work with PowerShell 2.0. Our clients are… Read more »

Unable to query Registry during task sequence – Property does not exist at path using Get-ItemProperty

Hi, As part of the MDT build process we set a couple of Registry Keys to tell us the status of the build (I.e in build or finished build) For logging purposes I retrieve the value of 2 keys from the registry, however when running the following command I get… Read more »

Custom PowerShell Objects

      No Comments on Custom PowerShell Objects

Ever wanted to have a custom PowerShell Object with custom property attributes? This can make your console output cleaner, and I also find it very useful when using Export-CSV. For the purpose of this post I’ve created an object that has 3 properties: “Hostname”, “Enabled”, and “NetworkUp”. The “Hostname” property… Read more »