O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Commands add-on: step-by-step exercises

In this exercise, you will explore using the Commands add-on by looking for cmdlets related to WMI. You will then select the Invoke-WmiMethod cmdlet from the list and create new processes. Following this exercise, you will use Windows PowerShell ISE snippets to create a WMI script.

Using the Commands add-on to use WMI methods

  1. Start the Windows PowerShell ISE.

  2. Use the Commands add-on to search for cmdlets related to WMI.

  3. Select the Invoke-WmiMethod cmdlet from the list.

  4. In the class block, add the WMI class name Win32_Process.

  5. In the name block, enter the method name create.

  6. In the argument list, enter notepad.

  7. Click the Run button. In the output console, you should see the following command, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required