<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Benp's Guide to Stuff</title><subtitle type="html" /><id>http://blogs.technet.com/benp/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/benp/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-07-19T12:40:00Z</updated><entry><title>Managing Large Infrastructures with PowerShell v2</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2009/01/06/managing-large-infrastructures-with-powershell-v2.aspx" /><id>http://blogs.technet.com/benp/archive/2009/01/06/managing-large-infrastructures-with-powershell-v2.aspx</id><published>2009-01-06T13:32:00Z</published><updated>2009-01-06T13:32:00Z</updated><content type="html">&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I had the pleasure of speaking at Tech Ed EMEA this year on the subject "Managing Large Infrastructures with PowerShell v2".&amp;nbsp; I co-presented the session with Jeffrey Snover and&amp;nbsp;a recording of this session has been uploaded to the&amp;nbsp;microsoft site. Here it is:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/emea/teched2008/itpro/tv/default.aspx?vid=80"&gt;http://www.microsoft.com/emea/teched2008/itpro/tv/default.aspx?vid=80&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR&gt;&lt;BR&gt;BenP&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3176910" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author></entry><entry><title>Interview with me on the Get-Scripting Blog</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2009/01/06/interview-with-me-on-the-get-scripting-blog.aspx" /><id>http://blogs.technet.com/benp/archive/2009/01/06/interview-with-me-on-the-get-scripting-blog.aspx</id><published>2009-01-06T13:10:00Z</published><updated>2009-01-06T13:10:00Z</updated><content type="html">&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I met Jonathan Medd at Tech Ed EMEA this year and he kindly invited me&amp;nbsp;to be interviewed&amp;nbsp;for his PowerShell podcast.&amp;nbsp; If you would like to listen to the podcast&amp;nbsp;it's here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://get-scripting.blogspot.com/2008/12/get-scripting-podcast-episode-6-ben.html"&gt;http://get-scripting.blogspot.com/2008/12/get-scripting-podcast-episode-6-ben.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Happy New Year&lt;/P&gt;
&lt;P&gt;BenP&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3176905" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author></entry><entry><title>Scripting Hyper-V with WMI and PowerShell: Part 1 – Introduction + Querying State</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/08/11/scripting-hyper-v-with-wmi-and-powershell-part-1-introduction-querying-state.aspx" /><link rel="enclosure" type="application/octet-stream" length="2007" href="http://blogs.technet.com/benp/attachment/3103483.ashx" /><id>http://blogs.technet.com/benp/archive/2008/08/11/scripting-hyper-v-with-wmi-and-powershell-part-1-introduction-querying-state.aspx</id><published>2008-08-11T18:37:00Z</published><updated>2008-08-11T18:37:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt; TEXT-ALIGN: center" align=center&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Scripting Hyper-V with WMI and PowerShell&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt; TEXT-ALIGN: center" align=center&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Part 1 – Introduction + Querying State&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Introduction&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;When it comes to scripting Hyper-V there are really 2 methods:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Using the virtualization WMI provider that ships with Hyper-V.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0cm 0cm 10pt 36pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Using the cmdlets provided by System Centre Virtual Machine Manager 2008&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So which option should you use?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Well if you want an easy life, the answer is absolutely Option 2.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Use SCVMM 2008, and scripting Hyper-V is like a pleasurable dream.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The cmdlets are task orientated, provide a rich set of features and really do work very well.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So why is this a guide to Option 1 – Using the virtualization WMI provider?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Well, sometimes Hyper-V will be used without an accompanying System Centre deployment, and if that’s the case, using WMI is your only scripting option.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I`ll be honest, using the WMI provider to script Hyper-V is unintuitive, complicated and feels quite clunky.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So the question has to be asked “Why is the Hyper-V WMI provider so difficult to use?”&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The answer is Industry Standards.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The virtualization WMI provider fully complies with the standards outlined by the Distributed Management Task Force (DMTF).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Whilst standards are great for creating consistency among different vendors, there are often comprises with the simplicity of individual solutions. Contrastingly the SCVMM cmdlets are a bespoke solution designed by Microsoft to be simple, intuitive and powerful, but do not adhere to any industry standards.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So, with the expectation that the Hyper-V WMI journey will be a challenging one, let’s get on with it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;WMI Basics&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;As mentioned we will be using the virtualization WMI provider, and before going any further I would strongly recommend that you spend some time understanding WMI to a reasonable depth.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;If you can answer the following questions, you’re probably familiar enough with WMI to get the most out of this tutorial:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo3"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;What is namespace?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo3"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;What is a class?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0cm 0cm 10pt 36pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo3"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;How do you create a WMI Object in PowerShell?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Basic WMI information is out of scope for this tutorial, so if you can’t answer the above questions, before continuing I would suggest the following pre-reading/viewing:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Brief WMI Intro on Technet Edge - &amp;nbsp;&lt;/FONT&gt;&lt;A href="http://edge.technet.com/Media/Powershell-tips-and-tricks-from-the-field-with-Ben-Pearce/" mce_href="http://edge.technet.com/Media/Powershell-tips-and-tricks-from-the-field-with-Ben-Pearce/"&gt;&lt;FONT face=Calibri size=3&gt;http://edge.technet.com/Media/Powershell-tips-and-tricks-from-the-field-with-Ben-Pearce&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Windows, PowerShell and WMI – Tech Ed 2008 Session &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=996" mce_href="http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=996"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=996&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Microsoft Windows PowerShell Step by Step Book- &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/MSPress/books/10329.aspx" mce_href="http://www.microsoft.com/MSPress/books/10329.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://www.microsoft.com/MSPress/books/10329.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0cm 0cm 10pt 36pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Hyper-V + WMI &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;There are 2 key points you need to understand to start using the Hyper-V WMI provider.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0cm 0cm 10pt 36pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo4"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;All Hyper-V classes live in the “Virtualization” namespace.&lt;/B&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Therefore whenever you want to instantiate an object you need to specify this namespace.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The following sample lists all the classes available in this namespace:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: auto auto auto 40.85pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 421.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=562&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Get-WMIObject –namespace “root\virtualization” -list&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt; TEXT-INDENT: 36pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0cm 0cm 10pt 36pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo4"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;PowerShell must be elevated and running as an administrator&lt;/B&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you run PowerShell in a non-administrative context you will not be able to connect to any guests, and will only be able to affect the host.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In Server 2008 you need to right-click the PowerShell icon, then click “Run As Administrator” to achieve this, even if logged on as an administrator.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;VMStateQuery&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Often, I find the best way to learn something is with a worked example.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Attached to this post is VMStateQuery.ps1, which is an example PowerShell script which can be used to determine the state of guests deployed to a Hyper-V host.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The script can be used to return the state of all guests on a host, or the state of 1 particular guest.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;.\VMStateQuery.ps1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This returns a list of all guests and their state, sorted alphabetically.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;.\VMStateQuery.ps1 -vhost myremotehost -sortbystate&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This returns a list of all the guests on MyRemoteHost, and sorts the guests by state.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;.\VMStateQuery.ps1 –vhost myremotehost –vguest MyGuest1&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This returns the state of the guest MyGuest1, running on the host MyRemoteHost.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Explanation&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Let’s dig into some interesting parts of this script.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The only time we use WMI in this example is in this 1 line:&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$vms = Get-WMIObject -Class Msvm_ComputerSystem -Namespace "root\virtualization" -ComputerName $vhost&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This line connects using WMI and retrieves all instances of MSVM_ComputerSystem on the computer specified by $VHost.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This line returns an array of all guests and the host, each one represented by an object.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In order to find out what we can with this object type we can do two things.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Firstly, use Get-Member to obtain all properties and methods, or use this &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc136822(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc136822(VS.85).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;MSDN link&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;, which details each property and method.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Having looked at the properties of this object we can see 2 properties that will be particularly useful when trying to query a guest’s state: elementname and enabledstate.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;ElementName is the name of the guest that you see in the Hyper-V MMC console, and enabledstate is a number that represents the state of the machine.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This bit of code filters our array of guests, and returns any that match the following&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$vms = $vms | where-object {$_.elementname -eq $vguest}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;We simply use where-object to filter, such that only guests whose elementname equals $vguest are retained.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;We use the enabledstate property to identify the state of the machine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, the state of the machine is a number which might not make too much sense.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Therefore I’ve created a function called ConvertStateToFriendly which simply uses a switch statement to return a friendly word for the state.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The call to this function is nested as an expression that can be used by the format-table cmdlet to display the information nicely.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here’s the code:&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$statefriendly = @{Expression={convertStateToFriendly $_.enabledstate};Label="State";width=25}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$vms | format-table Elementname, $statefriendly&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This code looks a little bid nasty, but is simply a way of creating custom tables. More details on how this mechanism works can be found &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/resources/pstips/jul07/pstip0713.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/resources/pstips/jul07/pstip0713.mspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;One final part I want to explain is this line:&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$vms = $vms | where-object{$_.caption -ne "Hosting Computer System"}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;When you get all instances of MSVM_ComputerSystem, one of the returned objects represents the host system.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In this script I am not really interested in the state of the host, just the state of the guests.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Therefore the above line simply looks at the caption property of the objects, and drops the object with the name “Hosting Computer System”.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;All the rest of the script is generic PowerShell code, used for parameters, error checking and other useful bits and pieces.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Hyper-V WMI Resources&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The two best resources for Hyper-V WMI scripting that I have come across so far are the MSDN page, and James O’Neil’s Hyper-V management library on CodePlex.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The MSDN page is the definitive source on the WMI provider and is here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The Code Plex project which James uploaded is a pretty comprehensive library on managing Hyper-V and WMI.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It’s an excellent source, but be warned it is pretty hardcore and very code efficient in places, which can sometimes be quite tricky to understand (maybe that’s just me &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;A href="http://www.codeplex.com/PSHyperv" mce_href="http://www.codeplex.com/PSHyperv"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://www.codeplex.com/PSHyperv&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;My colleague Richard Macdonald has written a very similar script, but using C# instead of PowerShell.&amp;nbsp; Check out his blog &lt;A class="" title="Richard Macdonald" href="http://blogs.technet.com/richard_macdonald/archive/2008/08/11/3103559.aspx" mce_href="http://blogs.technet.com/richard_macdonald/archive/2008/08/11/3103559.aspx"&gt;here&lt;/A&gt; for the code.&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Well that’s it for part 1.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Stay tuned for &lt;B style="mso-bidi-font-weight: normal"&gt;Part 2 –Hyper-V Data Gathering.&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Enjoy&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3103483" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="Hyper-V" scheme="http://blogs.technet.com/benp/archive/tags/Hyper-V/default.aspx" /><category term="VMStateQuery.ps1" scheme="http://blogs.technet.com/benp/archive/tags/VMStateQuery.ps1/default.aspx" /></entry><entry><title>Inteverview with me on Technet Edge</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/23/inteverview-with-me-on-technet-edge.aspx" /><id>http://blogs.technet.com/benp/archive/2008/06/23/inteverview-with-me-on-technet-edge.aspx</id><published>2008-06-23T22:01:00Z</published><updated>2008-06-23T22:01:00Z</updated><content type="html">&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I got kidnapped by the Tech Net Edge guys whilst I was at Tech Ed the other week, and intereviewed about&amp;nbsp;the PowerShell and WMI session that I was presenting there.&amp;nbsp; If you'd like to see the interview in full it's here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://edge.technet.com/Media/Powershell-tips-and-tricks-from-the-field-with-Ben-Pearce/"&gt;http://edge.technet.com/Media/Powershell-tips-and-tricks-from-the-field-with-Ben-Pearce/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You might need to use "the force" whilst watching the demos, as sadly some of the commands I was using were slightly off the screen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Have fun&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;BenP&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3076698" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="tech-ed" scheme="http://blogs.technet.com/benp/archive/tags/tech-ed/default.aspx" /></entry><entry><title>How to Configure a Server Core Domain Controller: Vanilla to First DC in a Forest</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/20/how-to-configure-a-server-core-domain-controller-vanilla-to-first-dc-in-a-forest.aspx" /><id>http://blogs.technet.com/benp/archive/2008/06/20/how-to-configure-a-server-core-domain-controller-vanilla-to-first-dc-in-a-forest.aspx</id><published>2008-06-20T10:43:00Z</published><updated>2008-06-20T10:43:00Z</updated><content type="html">&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Hi All&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Sometimes you just want a new Domain created quickly for a bit of testing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Given that Windows 2008 ships with server core, a light footprint version of the OS, it’s ideal for being the domain controller.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As I am fairly inexperienced with Server Core I had to search all over the place to find information on how to go from a vanilla server core build, to a dc running a brand new domain.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I figured out a set of commands that achieve this, so thought I would share them with the world.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Rename Host&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial"&gt;&lt;FONT face=Calibri&gt;Netdom renamecomputer &amp;lt;OldName&amp;gt; /NewName:&amp;lt;NewName&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Set IP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;I&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-weight: bold; mso-bidi-font-family: 'Courier New'"&gt;&lt;FONT face=Calibri&gt;netsh int ip set address "Local Area Connection" static 192.168.0.210 255.255.255.0 192.168.0.1 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Set DNS&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Netsh interface ipv4 add dnsserver name=”&amp;lt;idxname&amp;gt;” address=&amp;lt;IP Address&amp;gt; index = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Install DNS Role&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-weight: bold"&gt;start /w ocsetup DNS-Server-Core-Role&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Create New Domain&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-weight: bold"&gt;&lt;FONT face=Calibri&gt;dcpromo /unattend:c:\unattend.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-weight: bold"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Unattend.txt Contents&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri&gt;&lt;I&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-weight: bold; mso-bidi-font-family: 'Courier New'"&gt;[DCINSTALL]&lt;BR&gt;AutoConfigDNS=Yes&lt;BR&gt;DomainNetBiosName=benpdom&lt;BR&gt;NewDomainDNSName=benpdom.com&lt;BR&gt;ReplicaOrNewDomain=Domain&lt;BR&gt;NewDomain=Forest&lt;BR&gt;ForestLevel=3&lt;BR&gt;DomainLevel=3&lt;BR&gt;SafeModeAdminPassword=Password1234&lt;BR&gt;RebootOnSuccess=Yes&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Another cool Server Core reference can be found on Mark’s blog here:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;A href="http://blogs.technet.com/mempson/archive/2008/03/19/server-core-quick-reference-guide.aspx"&gt;&lt;FONT face=Calibri&gt;http://blogs.technet.com/mempson/archive/2008/03/19/server-core-quick-reference-guide.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Hope this helps&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;Cheers&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri&gt;BenP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3074880" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="server core" scheme="http://blogs.technet.com/benp/archive/tags/server+core/default.aspx" /><category term="unattend.txt" scheme="http://blogs.technet.com/benp/archive/tags/unattend.txt/default.aspx" /><category term="domain controller" scheme="http://blogs.technet.com/benp/archive/tags/domain+controller/default.aspx" /></entry><entry><title>Tech Ed 2008 - Demo 5 - Administering Failover Clustering</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-5-administering-failover-clustering.aspx" /><link rel="enclosure" type="application/octet-stream" length="334" href="http://blogs.technet.com/benp/attachment/3070092.ashx" /><id>http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-5-administering-failover-clustering.aspx</id><published>2008-06-12T21:02:00Z</published><updated>2008-06-12T21:02:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Finally, here is the last demo. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Demo 5 – Administering Failover Clustering&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I have already written a detailed post, and a similar script on this subject, &lt;A class="" title=Cluster href="http://blogs.technet.com/benp/archive/2007/05/15/clustering-best-practices-checking-hotfix-compliance.aspx" mce_href="http://blogs.technet.com/benp/archive/2007/05/15/clustering-best-practices-checking-hotfix-compliance.aspx"&gt;here&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However, I promised all the demos would be on my blog, so attached is the exact script I used at Tech Ed 2008.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Enjoy!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3070092" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="tech-ed" scheme="http://blogs.technet.com/benp/archive/tags/tech-ed/default.aspx" /><category term="Clustering" scheme="http://blogs.technet.com/benp/archive/tags/Clustering/default.aspx" /><category term="PowerShel" scheme="http://blogs.technet.com/benp/archive/tags/PowerShel/default.aspx" /></entry><entry><title>Tech Ed 2008 - Demo 4 - Administering Hyper-V</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-4-administering-hyper-v.aspx" /><id>http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-4-administering-hyper-v.aspx</id><published>2008-06-12T21:01:00Z</published><updated>2008-06-12T21:01:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;So here is &lt;B style="mso-bidi-font-weight: normal"&gt;Demo &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;4 – Administering Hyper-V&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I am planning to put more posts on my blog, looking at this subject in more depth, so stay tuned for more in depth demos.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This was is what I demo’d at Tech Ed 2008.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Notice the namespace that is used:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi –namespace “root\virtualization” –list&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi –namespace “root\virtualization” –class msvm_computersystem | get-member &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi –namespace “root\virtualization” –class msvm_computersystem | format-table elementname, enabledstate&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3070088" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="Hyper-V" scheme="http://blogs.technet.com/benp/archive/tags/Hyper-V/default.aspx" /></entry><entry><title>Tech Ed 2008 - Demo 3 - How do I Know Which Classes to Use</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-3-how-do-i-know-which-classes-to-use.aspx" /><id>http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-3-how-do-i-know-which-classes-to-use.aspx</id><published>2008-06-12T20:52:00Z</published><updated>2008-06-12T20:52:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Ola&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Demo 3 – How Do I Know Which Classes to Use&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In this demo I firstly used WMI Browser, which provides a GUI that can be used to visually display WMI information.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That can be downloaded from here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I then browsed for classes in PowerShell.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I have already documented this on my blog and it can be found &lt;A class="" title=WMI href="http://blogs.technet.com/benp/archive/2007/06/15/searching-wmi.aspx" mce_href="http://blogs.technet.com/benp/archive/2007/06/15/searching-wmi.aspx"&gt;here&lt;/A&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Phew, that was a short post.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Enjoy!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3070080" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /></entry><entry><title>Tech Ed 2008 - Demo 2 - Administering Servers in Bulk</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-2-administering-servers-in-bulk.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="1582" href="http://blogs.technet.com/benp/attachment/3070066.ashx" /><id>http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-2-administering-servers-in-bulk.aspx</id><published>2008-06-12T20:39:00Z</published><updated>2008-06-12T20:39:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Bonjour Bonjour&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;It’s time for Demo 2 – Administering Servers in Bulk.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I’ve attached the 4 scripts that I used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Demo 2 – Administering Servers in Bulk&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;BulkServers1.ps1&lt;/B&gt; – This script reads in a text file, containing 1 server per line.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It simply then writes the server names back to the console&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;BulkServers2.ps1&lt;/B&gt; – This script extends the first script and simply gets the hostname, operating system and service pack level for each server listed in the input file.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;BulkServers3.ps1&lt;/B&gt; – This script gets a little bit more complex and in fact is rather exciting.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It again reads an input file and for each server, gets operating system information, bios information, writes this to a CSV file and then opens the csv file in your default CSV file handler.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;BulkServers4.ps1&lt;/B&gt; – The piece de resistance!&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This script is very similar to the above script, except that rather than read an input file with server names, it connects to the Domain Controller container in the Active Directory, and gets information from all computers in that container.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Please note, there is no error checking in these scripts, and are purely working illustrations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I would flesh these scripts out a bit more before I used them in anything other than a test infrastructure.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;All done, stay tuned for Demo 3 – How Do I Know Which Classes to Use&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;That is all.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3070066" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="Active Directory" scheme="http://blogs.technet.com/benp/archive/tags/Active+Directory/default.aspx" /><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="Bulk" scheme="http://blogs.technet.com/benp/archive/tags/Bulk/default.aspx" /></entry><entry><title>Tech Ed 2008 - Demo 1 - Administering Windows</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-1-administering-windows.aspx" /><id>http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-1-administering-windows.aspx</id><published>2008-06-12T20:33:00Z</published><updated>2008-06-12T20:33:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Hello Again&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Well I’ve delivered my session “Windows, PowerShell and WMI: Unveiling Microsoft’s Best Kept Secret”, and as promised here are the scripts for the Demo’s I used during my session:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Demo 1 – Administering Windows&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;All these demos are simple command lines that I just typed straight in PowerShell, no need for any fancy scripts.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B&gt;&lt;FONT face=Calibri size=3&gt;Basics&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;The following lines of code show help on how to use the Get-WMIObject cmdlet in PowerShell, how to list all classes in the cimv2 namespace and finally how to use some basic parameters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Get-Help -name Get-WMIObject &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Get-Help -name Get-WMIObject –det &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;get-wmiobject -namespace "root\cimv2" –list&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi -namespace "root\cimv2" –list&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi -namespace "root\cimv2" -class Win32_LogicalDisk&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi -class Win32_LogicalDisk&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi Win32_LogicalDisk&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi Win32_LogicalDisk –computername localhost &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$cred = get-credentials&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi Win32_LogicalDisk –credential $cred &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Disks&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN style="mso-bidi-font-weight: bold"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;These lines of code show how to get disk information from a system, identify all the properties and methods of the disk objects that can be used, then uses some properties.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Gwmi Win32_LogicalDisk | Get-Member&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$disks = gwmi Win32_LogicalDisk –computername localhost &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$disks[0].freespace &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$disks[0].freespace/1gb&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$disks[0].filesystem &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Hotfixes &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN style="mso-bidi-font-weight: bold"&gt;&lt;FONT face=Calibri size=3&gt;These lines connect to a system and list all the Hotfixes that have been installed.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$hotfixes = gwmi Win32_QuickFixEngineering –computername localhost &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$hotfixes | get-member&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;$hotfixes | format-table Hotfixid &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;OperatingSystem&lt;/B&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;These lines enumerate basic operating system information: the OS version, service pack level and OS architecture type.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT size=3&gt;&lt;SPAN lang=PT-BR style="FONT-FAMILY: 'Courier New'; mso-ansi-language: PT-BR"&gt;$os = gwmi win32_OperatingSystem -computername Serverxxx&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT size=3&gt;&lt;SPAN lang=PT-BR style="FONT-FAMILY: 'Courier New'; mso-ansi-language: PT-BR"&gt;$os | get-member&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=PT-BR style="FONT-FAMILY: 'Courier New'; mso-ansi-language: PT-BR"&gt;&lt;FONT size=3&gt;$os | format-list caption, CSDVersion,OSArchitecture&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;B&gt;&lt;SPAN lang=PT-BR style="mso-ansi-language: PT-BR"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Network Adapter &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The following lines modify the IP Address and Subnet Mask of a network adapter using the EnableStatic method.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #bfbfbf; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 191" vAlign=top width=616&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;$nics = Gwmi win32_NetworkAdapterConfiguration&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;$nic = $nics | where{$_.description –like “*XXXXXXXXXXXX*”}&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;$IPAddress = x.x.x.x &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;$subnetmask = x.x.x.x &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Calibri size=3&gt;$nic.EnableStatic($IPAddress, $SubnetMask) &lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0cm 0cm 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Well that’s the first demo stay tuned for Demo 2 – Administering Servers in Bulk.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;Enjoy!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3070063" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="disk" scheme="http://blogs.technet.com/benp/archive/tags/disk/default.aspx" /><category term="hotfix" scheme="http://blogs.technet.com/benp/archive/tags/hotfix/default.aspx" /><category term="network adapters" scheme="http://blogs.technet.com/benp/archive/tags/network+adapters/default.aspx" /></entry><entry><title>Listing WMI Namespaces installed on a host</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2008/01/29/listing-wmi-namespaces-installed-on-a-host.aspx" /><id>http://blogs.technet.com/benp/archive/2008/01/29/listing-wmi-namespaces-installed-on-a-host.aspx</id><published>2008-01-29T14:06:00Z</published><updated>2008-01-29T14:06:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Ladies and Gents&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Many months ago I posted a script on how to search a namespace for different classes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The post is &lt;/FONT&gt;&lt;A href="http://blogs.technet.com/benp/archive/2007/06/15/searching-wmi.aspx"&gt;&lt;FONT face=Calibri size=3&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;A common question I then get asked is “How do I know what WMI namespaces are installed on a system?”&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The answer is not immediately obvious so I thought I’d share it with you all.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Get-WMIObject -class __Namespace -namespace root | Format-Table name&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I get the following output from my Vista RTM machine.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" cellSpacing=0 cellPadding=0 border=1 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 5.4pt; BACKGROUND: #d9d9d9; PADDING-BOTTOM: 0cm; BORDER-LEFT: #f0f0f0; WIDTH: 462.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #f0f0f0; mso-background-themecolor: background1; mso-background-themeshade: 217" vAlign=top width=616&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;name&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;----&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;subscription&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;DEFAULT&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;MicrosoftDfs&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;CIMV2&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Cli&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Nap&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;SECURITY&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;SmsDm&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;RSOP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;ccm&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;WMI&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Policy&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;ServiceModel&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;SecurityCenter&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;MSAPPS12&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Microsoft&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;Aspnet&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT size=3&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So by searching the host for a list of namespaces, and then searching each namespace for the classes available you can find some really useful stuff.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Hope this helps&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2793745" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wmi" scheme="http://blogs.technet.com/benp/archive/tags/wmi/default.aspx" /><category term="namespace" scheme="http://blogs.technet.com/benp/archive/tags/namespace/default.aspx" /><category term="class" scheme="http://blogs.technet.com/benp/archive/tags/class/default.aspx" /><category term="get-wmiobject" scheme="http://blogs.technet.com/benp/archive/tags/get-wmiobject/default.aspx" /><category term="gwmi" scheme="http://blogs.technet.com/benp/archive/tags/gwmi/default.aspx" /></entry><entry><title>PowerShell To Be Added to Common Engineering Criteria</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2007/11/23/powershell-to-be-added-to-common-engineering-criteria.aspx" /><id>http://blogs.technet.com/benp/archive/2007/11/23/powershell-to-be-added-to-common-engineering-criteria.aspx</id><published>2007-11-23T11:50:26Z</published><updated>2007-11-23T11:50:26Z</updated><content type="html">&lt;p&gt;Hi All&lt;/p&gt;  &lt;p&gt;Some of you may of heard about this already, but it's recently been announced that PowerShell will be in the Microsoft Common Engineering Criteria for 2009.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What is the Common Engineering Criteria?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The Common Engineering Criteria is a set of criteria that each Microsoft server product should adhere to. The criteria was set up in 2005 and has been updated each year with a new set of requirements.&amp;#xA0; The word on the street is that in 2009, PowerShell support will be added to this list, meaning that from 2009 all server products that are released should have full PowerShell support.&amp;#xA0; Wahoo!&lt;/p&gt;  &lt;p&gt;For more details on the Common Engineering Criteria check out the homepage: &lt;a title="http://www.microsoft.com/windowsserversystem/cer/allcriteria.mspx" href="http://www.microsoft.com/windowsserversystem/cer/allcriteria.mspx"&gt;http://www.microsoft.com/windowsserversystem/cer/allcriteria.mspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For a checklist of the current criteria, and a report on which products implement them, check out this link: &lt;a title="http://www.microsoft.com/windowsserversystem/cer/report.mspx" href="http://www.microsoft.com/windowsserversystem/cer/report.mspx"&gt;http://www.microsoft.com/windowsserversystem/cer/report.mspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So to all those that haven't learnt PowerShell yet ... it is time.&amp;#xA0; PowerShell is not going away!&lt;/p&gt;  &lt;p&gt;&amp;#xA0;&lt;/p&gt;  &lt;p&gt;Cheers all&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;BenP&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2547437" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author></entry><entry><title>Intro to SCVMM</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2007/11/22/intro-to-scvmm.aspx" /><link rel="enclosure" type="application/vnd.openxmlformats-officedocument.pres" length="1319813" href="http://blogs.technet.com/benp/attachment/2544434.ashx" /><id>http://blogs.technet.com/benp/archive/2007/11/22/intro-to-scvmm.aspx</id><published>2007-11-22T18:01:00Z</published><updated>2007-11-22T18:01:00Z</updated><content type="html">&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I had the pleasure of presenting a joint session at the PowerShell UK User Group this week.&amp;nbsp; I presented a joint session with Jeremy Peck from HP on an Introduction to SCVMM and scripting it with PowerShell.&amp;nbsp; I have attached my slide deck from the first half of the session.&amp;nbsp; In order to see Jeremy's deck with PowerShell examples, and the other sessions that were presented at the event please see the links on the Get-PSUGUK homepage (if they are not there yet Richard Siddaway should have them up soon)&lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.culminisconnections.com/sites/get-psuguk/default.aspx href="http://www.culminisconnections.com/sites/get-psuguk/default.aspx" mce_href="http://www.culminisconnections.com/sites/get-psuguk/default.aspx"&gt;http://www.culminisconnections.com/sites/get-psuguk/default.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Enjoy&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;BenP&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2544434" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author></entry><entry><title>Vista Event Logs and PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2007/10/30/vista-event-logs-and-powershell.aspx" /><id>http://blogs.technet.com/benp/archive/2007/10/30/vista-event-logs-and-powershell.aspx</id><published>2007-10-30T17:40:00Z</published><updated>2007-10-30T17:40:00Z</updated><content type="html">&lt;DIV class=csharpcode-wrapper&gt;
&lt;DIV&gt;Hello Everybody&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Sorry for the huge delay in posting anything, I promise I will never leave it so long again.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I got asked a question the other day.&amp;nbsp; Can I use Get-EventLog to access all the new logs that are in Vista?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Which logs am I referring to you may ask. Well, there are loads of new logs that can provide a massive set of troubleshooting information. Here's a screen shot from my Vista laptop that shows some of the logs:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://blogs.technet.com/blogfiles/benp/WindowsLiveWriter/VistaEventLogsandPowerShell_CA29/image_2.png" mce_href="http://blogs.technet.com/blogfiles/benp/WindowsLiveWriter/VistaEventLogsandPowerShell_CA29/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=672 alt=image src="http://blogs.technet.com/blogfiles/benp/WindowsLiveWriter/VistaEventLogsandPowerShell_CA29/image_thumb.png" width=698 border=0 mce_src="http://blogs.technet.com/blogfiles/benp/WindowsLiveWriter/VistaEventLogsandPowerShell_CA29/image_thumb.png"&gt;&lt;/A&gt; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So the question is can I query the Backup, Bits-Client, DiskDiagnostic and all the other logs using the Get-Eventlog cmdlet.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;In short no.&amp;nbsp; You can however still use PowerShell, but you need to use a command line tool that ships in Vista, wevtutil.exe.&amp;nbsp; You can find out all the logs that can be accessed using Get-Eventlog with the -list parameter.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: Consolas, 'Courier New', Courier, Monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;PS C:\Users\benp&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG&gt;Get-EventLog -list&lt;/STRONG&gt;

  Max(K) Retain OverflowAction        Entries Name
  ------ ------ --------------        ------- ----
  15,168      0 OverwriteAsNeeded       1,381 Application
  15,168      0 OverwriteAsNeeded           0 DFS Replication
  20,480      0 OverwriteAsNeeded           0 Hardware Events
     512      7 OverwriteOlder              0 Internet Explorer
     512      7 OverwriteOlder              0 Key Management Service
   8,192      0 OverwriteAsNeeded           0 Media Center
  16,384      0 OverwriteAsNeeded           0 Microsoft Office Diagnostics
  16,384      0 OverwriteAsNeeded          29 Microsoft Office Sessions

  15,168      0 OverwriteAsNeeded       4,109 System
  15,360      0 OverwriteAsNeeded          40 Windows PowerShell&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV class=csharpcode-wrapper&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=csharpcode-wrapper&gt;All of the above logs are part of the standard Windows Event Log.&amp;nbsp; However, all of the the other logs in the screenshot use Windows Eventing 6.0.&amp;nbsp; Get-EventLog does not hook into Windows Eventing 6.0.&lt;/DIV&gt;
&lt;DIV class=csharpcode-wrapper&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=csharpcode-wrapper&gt;So how can I get at these logs using PowerShell?&amp;nbsp; Check out the sample below:&lt;/DIV&gt;
&lt;DIV class=csharpcode-wrapper&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: Consolas, 'Courier New', Courier, Monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;PS C:\Users\benp&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG&gt;wevtutil.exe qe Microsoft-Windows-UAC/Operational /c:2 /f:text&lt;/STRONG&gt;
Event[0]:
  Log Name: Microsoft-Windows-UAC/Operational
  Source: Microsoft-Windows-UAC
  Date: 2007-10-30T11:14:00.524
  Event ID: 1
  Task: N/A
  Level: Error
  Opcode: Info
  Keyword: N/A
  User: S-1-5-21-1721234763-462695806-1538865281-2692397
  User Name: testdom\benp
  Computer: vista.test.microsoft.com
  Description:
The process failed to handle ERROR_ELEVATION_REQUIRED during the creation of a child process.&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;This sample connects to the UAC Operational log and displays the newest 2 items as text.&amp;nbsp; (There is only 1 event listed, because I only have 1 entry in the log).&lt;/P&gt;
&lt;P&gt;So yes I can access these logs using PowerShell, but no I can't use the Get-EventLog cmdlet to do it.&amp;nbsp; Check out the following link for detailed syntax for using wevtutil.exe&lt;/P&gt;
&lt;P&gt;&lt;A title=http://technet2.microsoft.com/windowsserver2008/en/library/d4c791e0-7e59-45c5-aa55-0223b77a48221033.mspx?mfr=true href="http://technet2.microsoft.com/windowsserver2008/en/library/d4c791e0-7e59-45c5-aa55-0223b77a48221033.mspx?mfr=true" mce_href="http://technet2.microsoft.com/windowsserver2008/en/library/d4c791e0-7e59-45c5-aa55-0223b77a48221033.mspx?mfr=true"&gt;http://technet2.microsoft.com/windowsserver2008/en/library/d4c791e0-7e59-45c5-aa55-0223b77a48221033.mspx?mfr=true&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks to Narayanan Lakshmanan for answering the many questions I had about this.&lt;/P&gt;
&lt;P&gt;That is all&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;BenP&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2288602" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="wevtutil.exe" scheme="http://blogs.technet.com/benp/archive/tags/wevtutil.exe/default.aspx" /><category term="get-eventlog" scheme="http://blogs.technet.com/benp/archive/tags/get-eventlog/default.aspx" /><category term="vista" scheme="http://blogs.technet.com/benp/archive/tags/vista/default.aspx" /></entry><entry><title>Scripting Virtual Server with PowerShell - Create-ChildVM.ps1</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/benp/archive/2007/07/19/scripting-virtual-server-create-childvm-ps1.aspx" /><link rel="enclosure" type="text/plain" length="3645" href="http://blogs.technet.com/benp/attachment/1557379.ashx" /><id>http://blogs.technet.com/benp/archive/2007/07/19/scripting-virtual-server-create-childvm-ps1.aspx</id><published>2007-07-19T14:40:00Z</published><updated>2007-07-19T14:40:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Hello&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I hate writing up scripts.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Writing the scripts themselves is great, it’s just explaining them after which is really boring &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Here is the second demo script I used last week, Create-ChildVM.ps1.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This script is invaluable if you need to quickly deploy machines in a test lab.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I say test lab rather than production because this script uses differencing disks, which do not perform as well as fixed disk.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They are great to use when you have disk space constraints, but on a beefy production system I would use fixed disks.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A differencing disk has a read-only parent disk which can be used to store the operating system.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then any changes made to the disk are actually stored in the differencing disk.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In this example my parent disk is a Windows 2003 SP2 sysprepped disk.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The child then holds any differences.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Multiple children can point to the same parent and parent disks can be chained together.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This script takes no parameters, and provides a menu system.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The VM is created in seconds and the machine is up running in a matter of minutes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I won’t explain the whole script, but just shout if you have any questions.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There is no error checking in this script.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Version 2 will have some error checking built in – I promise &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Thanks go to Steven Adler who's code I p&lt;/FONT&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;FONT size=3&gt;lagiarised &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;for some (most)&amp;nbsp;of the sections.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Cheers&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;BenP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1557379" width="1" height="1"&gt;</content><author><name>benp</name><uri>http://blogs.technet.com/members/benp.aspx</uri></author><category term="PowerShell" scheme="http://blogs.technet.com/benp/archive/tags/PowerShell/default.aspx" /><category term="Virtual Server" scheme="http://blogs.technet.com/benp/archive/tags/Virtual+Server/default.aspx" /><category term="create-childvm.ps1" scheme="http://blogs.technet.com/benp/archive/tags/create-childvm.ps1/default.aspx" /></entry></feed>