Creating a script from VMM wizards

You can use the VMM console to help you with the PowerShell script to automate tasks.

Getting the script from a previous task that was executed in the VMM console will save you time when working with scripts. Save the script, then personalize it to make it generic. Every task that is created in VMM can be scripted.

How to do it...

You can create a script from one of the VMM wizards. In this recipe, we will create a script based on how a hardware profile is created. Carry out the following steps in order to do so:

  1. Connect to the VMM 2012 R2 console using the VMM admin account that was created previously (lab\vmm-admin).
  2. On the left-bottom pane, click on the Library workspace, expand Profiles on the left-hand side pane, ...

Get System Center 2012 R2 Virtual Machine Manager Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.