Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
System Center 2012 R2 Virtual Machine Manager Cookbook - Second Edition

You're reading from   System Center 2012 R2 Virtual Machine Manager Cookbook - Second Edition Over 70 recipes to help you design, configure, and manage a reliable and efficient virtual infrastructure with VMM 2012 R2.

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781782176848
Length 428 pages
Edition 2nd Edition
Arrow right icon
Authors (2):
Arrow left icon
EDVALDO ALESSANDRO CARDOSO EDVALDO ALESSANDRO CARDOSO
Author Profile Icon EDVALDO ALESSANDRO CARDOSO
EDVALDO ALESSANDRO CARDOSO
Edvaldo Alessandro Cardoso Sobrinho Edvaldo Alessandro Cardoso Sobrinho
Author Profile Icon Edvaldo Alessandro Cardoso Sobrinho
Edvaldo Alessandro Cardoso Sobrinho
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. VMM 2012 Architecture FREE CHAPTER 2. Upgrading from Previous Versions 3. Installing VMM 2012 R2 4. Installing a High Available VMM Server 5. Configuring Fabric Resources in VMM 6. Deploying Virtual Machines and Services 7. Managing VMware ESXi and Citrix® XenServer® Hosts 8. Managing Hybrid Clouds, Fabric Updates, Resources, Clusters, and the New Features of R2 9. Integration with System Center Operations Manager 2012 R2 10. Scripting in Virtual Machine Manager Index

Storing and running scripts in VMM


A script is a text file that contains one or more Windows PowerShell commands. You can save PowerShell scripts to a folder that will be executed from the VMM command shell, or you can save them to the VMM library and run them using the VMM console.

Note

For the script to be recognized as a Windows PowerShell script, it has to be saved with a .ps1 extension.

Getting ready

Before you can run a script, check the Windows PowerShell execution policy. The default execution policy in Windows 2012 is Restricted, which prevents all scripts from running.

Note

In Windows 2012 R2, RemoteSigned is the default policy.

How to do it...

After writing a script, you can save it in the VMM library for later use.

Storing a script in the VMM library

Carry out the following steps to save a particular script to the VMM library:

  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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image