Monthly Archives: September 2016

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 »