Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Chapter 9: Understanding WMI, Scripting, and Hyper-V
It’s fortunate that the technology underpinnings exist in Windows and Hyper-V to customize access to virtual machines for users, easily automate processes, and collect information about a virtualization environment. You can use command-line tools, batch files, and scripting languages to tailor solutions in Windows Server 2008 and Hyper-V to meet nearly any virtualization requirements.
This chapter examines many of the scenarios you may encounter that require more than standard tools and looks at some of the automation techniques you can use with Hyper-V. We’ll look at the role of Windows Management Instrumentation (WMI) for managing Hyper-V and how you can use WMI from both VBScript and Windows PowerShell. Only a basic understanding of programming concepts is expected, and the chapter introduces PowerShell. Detailed scripting examples are shown in Chapter 10, “Automating Tasks.”