<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechProsaic &#187; Powershell</title>
	<atom:link href="http://halr9000.com/article/category/programming/scripting/powershell/feed" rel="self" type="application/rss+xml" />
	<link>http://halr9000.com</link>
	<description>(powershell &#38; other stuff)</description>
	<lastBuildDate>Sat, 28 Jan 2012 21:29:12 +0000</lastBuildDate>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PowerShell Workflow, defined (V3 CTP2)</title>
		<link>http://halr9000.com/article/947</link>
		<comments>http://halr9000.com/article/947#comments</comments>
		<pubDate>Fri, 23 Dec 2011 21:56:35 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[CTP2]]></category>
		<category><![CDATA[pre-release]]></category>
		<category><![CDATA[V3]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/947</guid>
		<description><![CDATA[A workflow is a sequence of automated steps or activities that execute tasks on or retrieve data from one or more managed nodes (computers or devices). These activities can include individual commands or scripts. Windows PowerShell Workflow enables, IT pros and developers alike, to author sequences of multi-computer management activities — that are either long-running, [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<blockquote><p>A workflow is a sequence of automated steps or activities that execute tasks on or retrieve data from one or more managed nodes (computers or devices). These activities can include individual commands or scripts. Windows PowerShell Workflow enables, IT pros and developers alike, to author sequences of multi-computer management activities — that are either long-running, repeatable, frequent, parallelizable, interruptible, stoppable, or restartable — as workflows. By design, workflows can be resumed from an intentional or accidental suspension or interruption, such as a network outage, a reboot or power loss.</p>
</blockquote>
<p>I just had to paste this paragraph. It comes from the recently published “Getting Started with PowerShell Workflow” as announced in <a href="http://blogs.msdn.com/b/powershell/archive/2011/12/22/another-holiday-gift-from-the-powershell-team-powershell-3-0-ctp2-getting-started-with-windows-powershell-workflow.aspx">this post</a> on the PowerShell team blog. You can grab the PDF from the <a href="http://www.microsoft.com/download/en/details.aspx?id=27548">WMF3 CTP2 download page</a>.</p>
<p>Hot stuff! Go grab the 14 page doc so you can be ready for when v3 ships! There are a ton of examples so that you get started quickly.</p>
<p><strong>Disclaimer</strong>: this is pre-release code and will definitely change</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/947/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerShell Tip: Don&#8217;t forget the type!</title>
		<link>http://halr9000.com/article/946</link>
		<comments>http://halr9000.com/article/946#comments</comments>
		<pubDate>Fri, 21 Oct 2011 16:17:58 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/946</guid>
		<description><![CDATA[So I’m sitting here building a bunch of virtual machines using PowerCLI. I decided to start with a spreadsheet into which I’ve collected many of the important things about a virtual machine: Since I don’t actually build VMs every day, and I haven’t focused on a build process (like I should, I know!) yet, this [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>So I’m sitting here building a bunch of virtual machines using PowerCLI. I decided to start with a spreadsheet into which I’ve collected many of the important things about a virtual machine:</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML840494" border="0" alt="SNAGHTML840494" src="http://halr9000.com/wp-content/uploads/2011/10/SNAGHTML840494.png" width="379" height="202" /></p>
<p>Since I don’t actually build VMs every day, and I haven’t focused on a build process (like I should, I know!) yet, this spreadsheet was a first draft of a build process and it was made for humans, not machines. What does this mean? Well, obviously, by looking at the Memory column, any of you would guess that the unit of measurement is gigabytes. However, VMware happens to measure memory in megabytes.</p>
<p>Long story short, I wrote a quick one-liner in PowerShell to “spec out” the newly-cloned virtual machines using this spreadsheet. As I said, it’s not a build process yet, but it will be when I’m done. Baby steps. The one-liner looks like this ($t is the variable that holds the data obtained from the spreadsheet, using a simple Import-Csv cmdlet):</p>
<div id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> $t | % { Set-VM -VM $_.name -NumCpu $_.cpu -MemoryMB $_.Memory }</pre>
<p><!--CRLF--></div>
</div>
<p>Once I started that running, I quickly realized that 8MB VMs would do me no good. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://halr9000.com/wp-content/uploads/2011/10/wlEmoticon-smile.png" /> So, I amended my script to this:</p>
<div id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> $t | % { Set-VM -VM $_.name -NumCpu $_.cpu -MemoryMB ( $_.Memory * 1024 ) }</pre>
<p><!--CRLF--></div>
</div>
<p>That’s when I got a really weird error:</p>
<p><font style="background-color: #cccccc" color="#ff0000" face="Courier New">Set-VM : Cannot bind parameter &#8216;MemoryMB&#8217;. Cannot convert value &quot;888888888888888888888888888888888888888888888888888888<br />
    <br />88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888</p>
<p>888888888888888888&quot; to type &quot;System.Int64&quot;. Error: &quot;Value was either too large or too small for an Int64.&quot;</font></p>
<p>Yuck! That one threw me for a loop for a moment until I realized the important lesson of the day. When you use a technique like Import-Csv, the resulting object is a bunch of strings! What happens when you multiply a string by a number in PowerShell? Yes, it’s effectively a concatenation. So in my case, the number 8 followed by one-thousand-and-twenty-three of the same. Nice, when that’s what you intended. That was not my intent this time!</p>
<p>So to round this post out with a fix, here’s the right way to get the intended result, which was to turn “8” into “8192”:</p>
<div id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> $t | % { Set-VM -VM $_.name -NumCpu $_.cpu -MemoryMB ( [<span style="color: #0000ff">int</span>]$_.Memory * 1024 ) }</pre>
<p><!--CRLF--></div>
</div>
<p>Note the “[int]” there before the $_. That will convert the resulting property to an integer BEFORE performing the multiplication. That’s the key here, it has to happen before (in the order of precedence), otherwise I end up with a bunch of 8’s. Now, I happen to know the order of operator precedence in PowerShell well enough to know that the above would work without any doubt, but if you aren’t sure about a particular piece of code, you can always surround a portion of a statement with parentheses in order to ensure that you get the order that you need.</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/946/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerCLI v5 is available today, download it NOW!</title>
		<link>http://halr9000.com/article/943</link>
		<comments>http://halr9000.com/article/943#comments</comments>
		<pubDate>Thu, 25 Aug 2011 13:51:51 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/943</guid>
		<description><![CDATA[Run, don’t walk to vmware.com/go/powercli to grab the latest version of the world’s best PowerShell snapin. That’s right, v5 is out and you can grab it now! And the coolest part is that while nobody will have vSphere 5 in production on day one (ok, there’s a couple of you out there), PowerCLI v5 is [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'PowerCLI' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'VMware' --><p>Run, don’t walk to <a href="http://vmware.com/go/powercli">vmware.com/go/powercli</a> to grab the latest version of the world’s best PowerShell snapin. That’s right, v5 is out and you can grab it now! And the coolest part is that while nobody will have vSphere 5 in production on day one (ok, there’s a couple of you out there), PowerCLI v5 is a client-based tool with no dependencies, and it’s downwards-compatible! There is literally no reason for you not to upgrade right this instant! I am using exclamations here, people!</p>
<p>I’ve had beta builds installed for some time, but I didn’t want to do blog posts based on pre-release builds for fear that things would change. Now that it’s out, I’ll start pushing out some posts about what’s new and all that, so stay tuned. For now, some quick stats and info:</p>
<p>There are now FOUR VMware snap-ins installed with PowerCLI v5:</p>
<blockquote><p><font face="Courier New">PowerCLI U:\&gt; Get-PSSnapin vmware*</font></p>
<p><font face="Courier New">Name&#160;&#160;&#160;&#160;&#160;&#160;&#160; : VMware.VimAutomation.Core       <br />PSVersion&#160;&#160; : 2.0        <br />Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets for managing vSphere.</font></p>
<p><font face="Courier New">Name&#160;&#160;&#160;&#160;&#160;&#160;&#160; : VMware.VimAutomation.License       <br />PSVersion&#160;&#160; : 2.0        <br />Description : This Windows Powershell snap-in contains cmdlets for managing License components.</font></p>
<p><font face="Courier New">Name&#160;&#160;&#160;&#160;&#160;&#160;&#160; : VMware.DeployAutomation       <br />PSVersion&#160;&#160; : 2.0        <br />Description : Cmdlets for Rule-Based-Deployment</font></p>
<p><font face="Courier New">Name&#160;&#160;&#160;&#160;&#160;&#160;&#160; : VMware.ImageBuilder       <br />PSVersion&#160;&#160; : 2.0        <br />Description : This Windows PowerShell snap-in contains VMware ESXi Image Builder cmdlets used to generate custom images.</font></p>
</blockquote>
<p>There are 293 cmdlets in total across these snap-ins. Here they are, grouped by Noun and Verb:</p>
<blockquote><p><font size="1" face="Courier New">PowerCLI U:\&gt; $c = Get-Command -Module vmware*       <br />PowerCLI U:\&gt; $c.Length        <br />293        <br />PowerCLI U:\&gt; $c | group verb</font></p>
<p><font size="1" face="Courier New">Count Name&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Group       <br />&#8212;&#8211; &#8212;-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;&#8211;        <br />&#160;&#160;&#160; 6 Add&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-DeployRule, Add-EsxSoftwareDepot, Add-E&#8230;        <br />&#160;&#160;&#160; 3 Apply&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Apply-DrsRecommendation, Apply-ESXImageProf&#8230;        <br />&#160;&#160;&#160; 1 Compare&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Compare-EsxImageProfile}        <br />&#160;&#160;&#160; 1 Connect&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Connect-VIServer}        <br />&#160;&#160;&#160; 4 Copy&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Copy-DatastoreItem, Copy-DeployRule, Copy-H&#8230;        <br />&#160;&#160;&#160; 1 Disconnect&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Disconnect-VIServer}        <br />&#160;&#160;&#160; 1 Dismount&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Dismount-Tools}        <br />&#160;&#160;&#160; 3 Export&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Export-EsxImageProfile, Export-VApp, Export&#8230;        <br />&#160;&#160;&#160; 1 Format&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Format-VMHostDiskPartition}        <br />&#160;&#160; 95 Get&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-AdvancedSetting, Get-AlarmAction, Get-A&#8230;        <br />&#160;&#160;&#160; 2 Import&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Import-VApp, Import-VMHostProfile}        <br />&#160;&#160;&#160; 1 Install&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Install-VMHostPatch}        <br />&#160;&#160;&#160; 1 Invoke&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Invoke-VMScript}        <br />&#160;&#160;&#160; 1 Mount&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Mount-Tools}        <br />&#160;&#160;&#160; 9 Move&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Move-Cluster, Move-Datacenter, Move-Folder,&#8230;        <br />&#160;&#160; 37 New&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {New-AdvancedSetting, New-AlarmAction, New-A&#8230;        <br />&#160;&#160; 42 Remove&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Remove-AdvancedSetting, Remove-AlarmAction,&#8230;        <br />&#160;&#160;&#160; 2 Repair&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Repair-DeployImageCache, Repair-DeployRuleS&#8230;        <br />&#160;&#160;&#160; 4 Restart&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Restart-VM, Restart-VMGuest, Restart-VMHost&#8230;        <br />&#160;&#160; 58 Set&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Set-AdvancedSetting, Set-AlarmDefinition, S&#8230;        <br />&#160;&#160;&#160; 1 Shutdown&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Shutdown-VMGuest}        <br />&#160;&#160;&#160; 4 Start&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Start-VApp, Start-VM, Start-VMHost, Start-V&#8230;        <br />&#160;&#160;&#160; 5 Stop&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Stop-Task, Stop-VApp, Stop-VM, Stop-VMHost&#8230;}        <br />&#160;&#160;&#160; 3 Suspend&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Suspend-VM, Suspend-VMGuest, Suspend-VMHost}        <br />&#160;&#160;&#160; 1 Switch&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Switch-ActiveDeployRuleSet}        <br />&#160;&#160;&#160; 3 Test&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Test-DeployRuleSetCompliance, Test-VMHostPr&#8230;        <br />&#160;&#160;&#160; 1 Update&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Update-Tools}        <br />&#160;&#160;&#160; 2 Wait&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Wait-Task, Wait-Tools}</font></p>
<p><font size="1" face="Courier New">PowerCLI U:\&gt; $c | group noun</font></p>
<p><font size="1" face="Courier New">Count Name&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Group       <br />&#8212;&#8211; &#8212;-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;&#8211;        <br />&#160;&#160;&#160; 6 DeployRule&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-DeployRule, Copy-DeployRule, Get-Deploy&#8230;        <br />&#160;&#160;&#160; 2 EsxSoftwareDepot&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-EsxSoftwareDepot, Remove-EsxSoftwareDepot}        <br />&#160;&#160;&#160; 3 EsxSoftwarePackage&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-EsxSoftwarePackage, Get-EsxSoftwarePack&#8230;        <br />&#160;&#160;&#160; 3 PassthroughDevice&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-PassthroughDevice, Get-PassthroughDevic&#8230;        <br />&#160;&#160;&#160; 9 VMHost&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-VMHost, Get-VMHost, Move-VMHost, Remove&#8230;        <br />&#160;&#160;&#160; 3 VmHostNtpServer&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Add-VmHostNtpServer, Get-VMHostNtpServer, R&#8230;        <br />&#160;&#160;&#160; 2 DrsRecommendation&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Apply-DrsRecommendation, Get-DrsRecommendat&#8230;        <br />&#160;&#160;&#160; 6 ESXImageProfile&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Apply-ESXImageProfile, Compare-EsxImageProf&#8230;        <br />&#160;&#160;&#160; 7 VMHostProfile&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Apply-VMHostProfile, Export-VMHostProfile, &#8230;        <br />&#160;&#160;&#160; 2 VIServer&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Connect-VIServer, Disconnect-VIServer}        <br />&#160;&#160;&#160; 1 DatastoreItem&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Copy-DatastoreItem}        <br />&#160;&#160;&#160; 5 HardDisk&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Copy-HardDisk, Get-HardDisk, New-HardDisk, &#8230;        <br />&#160;&#160;&#160; 1 VMGuestFile&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Copy-VMGuestFile}        <br />&#160;&#160;&#160; 4 Tools&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Dismount-Tools, Mount-Tools, Update-Tools, &#8230;        <br />&#160;&#160;&#160; 9 VApp&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Export-VApp, Get-VApp, Import-VApp, Move-VA&#8230;        <br />&#160;&#160;&#160; 2 VMHostDiskPartition&#160;&#160;&#160;&#160;&#160;&#160; {Format-VMHostDiskPartition, Get-VMHostDiskP&#8230;        <br />&#160;&#160;&#160; 4 AdvancedSetting&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-AdvancedSetting, New-AdvancedSetting, R&#8230;        <br />&#160;&#160;&#160; 3 AlarmAction&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-AlarmAction, New-AlarmAction, Remove-Al&#8230;        <br />&#160;&#160;&#160; 3 AlarmActionTrigger&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-AlarmActionTrigger, New-AlarmActionTrig&#8230;        <br />&#160;&#160;&#160; 2 AlarmDefinition&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-AlarmDefinition, Set-AlarmDefinition}        <br />&#160;&#160;&#160; 2 Annotation&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Annotation, Set-Annotation}        <br />&#160;&#160;&#160; 4 CDDrive&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-CDDrive, New-CDDrive, Remove-CDDrive, S&#8230;        <br />&#160;&#160;&#160; 5 Cluster&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Cluster, Move-Cluster, New-Cluster, Rem&#8230;        <br />&#160;&#160;&#160; 4 CustomAttribute&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-CustomAttribute, New-CustomAttribute, R&#8230;        <br />&#160;&#160;&#160; 5 Datacenter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Datacenter, Move-Datacenter, New-Datace&#8230;        <br />&#160;&#160;&#160; 4 Datastore&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Datastore, New-Datastore, Remove-Datast&#8230;        <br />&#160;&#160;&#160; 1 DatastoreCluster&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-DatastoreCluster}        <br />&#160;&#160;&#160; 2 DeployRuleSet&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-DeployRuleSet, Set-DeployRuleSet}        <br />&#160;&#160;&#160; 4 DrsRule&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-DrsRule, New-DrsRule, Remove-DrsRule, S&#8230;        <br />&#160;&#160;&#160; 1 ErrorReport&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-ErrorReport}        <br />&#160;&#160;&#160; 1 EsxCli&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-EsxCli}        <br />&#160;&#160;&#160; 1 EsxSoftwareChannel&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-EsxSoftwareChannel}        <br />&#160;&#160;&#160; 1 EsxTop&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-EsxTop}        <br />&#160;&#160;&#160; 4 FloppyDrive&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-FloppyDrive, New-FloppyDrive, Remove-Fl&#8230;        <br />&#160;&#160;&#160; 5 Folder&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Folder, Move-Folder, New-Folder, Remove&#8230;        <br />&#160;&#160;&#160; 1 HAPrimaryVMHost&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-HAPrimaryVMHost}        <br />&#160;&#160;&#160; 3 Inventory&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Inventory, Move-Inventory, Remove-Inven&#8230;        <br />&#160;&#160;&#160; 4 IScsiHbaTarget&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-IScsiHbaTarget, New-IScsiHbaTarget, Rem&#8230;        <br />&#160;&#160;&#160; 1 LicenseDataManager&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-LicenseDataManager}        <br />&#160;&#160;&#160; 1 Log&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Log}        <br />&#160;&#160;&#160; 1 LogType&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-LogType}        <br />&#160;&#160;&#160; 4 NetworkAdapter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-NetworkAdapter, New-NetworkAdapter, Rem&#8230;        <br />&#160;&#160;&#160; 2 NicTeamingPolicy&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-NicTeamingPolicy, Set-NicTeamingPolicy}        <br />&#160;&#160;&#160; 4 OSCustomizationNicMapping {Get-OSCustomizationNicMapping, New-OSCustom&#8230;        <br />&#160;&#160;&#160; 4 OSCustomizationSpec&#160;&#160;&#160;&#160;&#160;&#160; {Get-OSCustomizationSpec, New-OSCustomizatio&#8230;        <br />&#160;&#160;&#160; 2 PowerCLIConfiguration&#160;&#160;&#160;&#160; {Get-PowerCLIConfiguration, Set-PowerCLIConf&#8230;        <br />&#160;&#160;&#160; 1 PowerCLIVersion&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-PowerCLIVersion}        <br />&#160;&#160;&#160; 5 ResourcePool&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-ResourcePool, Move-ResourcePool, New-Re&#8230;        <br />&#160;&#160;&#160; 3 ScsiController&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-ScsiController, New-ScsiController, Set&#8230;        <br />&#160;&#160;&#160; 2 ScsiLun&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-ScsiLun, Set-ScsiLun}        <br />&#160;&#160;&#160; 2 ScsiLunPath&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-ScsiLunPath, Set-ScsiLunPath}        <br />&#160;&#160;&#160; 4 Snapshot&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Snapshot, New-Snapshot, Remove-Snapshot&#8230;        <br />&#160;&#160;&#160; 1 Stat&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Stat}        <br />&#160;&#160;&#160; 4 StatInterval&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-StatInterval, New-StatInterval, Remove-&#8230;        <br />&#160;&#160;&#160; 1 StatType&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-StatType}        <br />&#160;&#160;&#160; 3 Task&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Task, Stop-Task, Wait-Task}        <br />&#160;&#160;&#160; 5 Template&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-Template, Move-Template, New-Template, &#8230;        <br />&#160;&#160;&#160; 2 UsbDevice&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-UsbDevice, Remove-UsbDevice}        <br />&#160;&#160;&#160; 1 VIAccount&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIAccount}        <br />&#160;&#160;&#160; 3 VICredentialStoreItem&#160;&#160;&#160;&#160; {Get-VICredentialStoreItem, New-VICredential&#8230;        <br />&#160;&#160;&#160; 1 VIEvent&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIEvent}        <br />&#160;&#160;&#160; 1 View&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-View}        <br />&#160;&#160;&#160; 1 VIObjectByVIView&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIObjectByVIView}        <br />&#160;&#160;&#160; 4 VIPermission&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIPermission, New-VIPermission, Remove-&#8230;        <br />&#160;&#160;&#160; 1 VIPrivilege&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIPrivilege}        <br />&#160;&#160;&#160; 3 VIProperty&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIProperty, New-VIProperty, Remove-VIPr&#8230;        <br />&#160;&#160;&#160; 4 VIRole&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VIRole, New-VIRole, Remove-VIRole, Set-&#8230;        <br />&#160;&#160;&#160; 4 VirtualPortGroup&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VirtualPortGroup, New-VirtualPortGroup,&#8230;        <br />&#160;&#160;&#160; 4 VirtualSwitch&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VirtualSwitch, New-VirtualSwitch, Remov&#8230;        <br />&#160;&#160;&#160; 9 VM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VM, Move-VM, New-VM, Remove-VM&#8230;}        <br />&#160;&#160;&#160; 4 VMGuest&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMGuest, Restart-VMGuest, Shutdown-VMGu&#8230;        <br />&#160;&#160;&#160; 2 VMGuestNetworkInterface&#160;&#160; {Get-VMGuestNetworkInterface, Set-VMGuestNet&#8230;        <br />&#160;&#160;&#160; 3 VMGuestRoute&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMGuestRoute, New-VMGuestRoute, Remove-&#8230;        <br />&#160;&#160;&#160; 4 VMHostAccount&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostAccount, New-VMHostAccount, Remov&#8230;        <br />&#160;&#160;&#160; 2 VMHostAdvancedConfigur&#8230; {Get-VMHostAdvancedConfiguration, Set-VMHost&#8230;        <br />&#160;&#160;&#160; 1 VMHostAttributes&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostAttributes}        <br />&#160;&#160;&#160; 2 VMHostAuthentication&#160;&#160;&#160;&#160;&#160; {Get-VMHostAuthentication, Set-VMHostAuthent&#8230;        <br />&#160;&#160;&#160; 1 VMHostAvailableTimeZone&#160;&#160; {Get-VMHostAvailableTimeZone}        <br />&#160;&#160;&#160; 2 VMHostDiagnosticPartition {Get-VMHostDiagnosticPartition, Set-VMHostDi&#8230;        <br />&#160;&#160;&#160; 1 VMHostDisk&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostDisk}        <br />&#160;&#160;&#160; 2 VMHostFirewallDefaultP&#8230; {Get-VMHostFirewallDefaultPolicy, Set-VMHost&#8230;        <br />&#160;&#160;&#160; 2 VMHostFirewallException&#160;&#160; {Get-VMHostFirewallException, Set-VMHostFire&#8230;        <br />&#160;&#160;&#160; 2 VMHostFirmware&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostFirmware, Set-VMHostFirmware}        <br />&#160;&#160;&#160; 2 VMHostHba&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostHba, Set-VMHostHba}        <br />&#160;&#160;&#160; 1 VMHostImageProfile&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostImageProfile}        <br />&#160;&#160;&#160; 1 VMHostMatchingRules&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostMatchingRules}        <br />&#160;&#160;&#160; 2 VMHostModule&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostModule, Set-VMHostModule}        <br />&#160;&#160;&#160; 2 VMHostNetwork&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostNetwork, Set-VMHostNetwork}        <br />&#160;&#160;&#160; 4 VMHostNetworkAdapter&#160;&#160;&#160;&#160;&#160; {Get-VMHostNetworkAdapter, New-VMHostNetwork&#8230;        <br />&#160;&#160;&#160; 2 VMHostPatch&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostPatch, Install-VMHostPatch}        <br />&#160;&#160;&#160; 1 VMHostProfileRequiredI&#8230; {Get-VMHostProfileRequiredInput}        <br />&#160;&#160;&#160; 4 VMHostRoute&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostRoute, New-VMHostRoute, Remove-VM&#8230;        <br />&#160;&#160;&#160; 5 VMHostService&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostService, Restart-VMHostService, S&#8230;        <br />&#160;&#160;&#160; 3 VMHostSnmp&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostSnmp, Set-VMHostSnmp, Test-VMHost&#8230;        <br />&#160;&#160;&#160; 2 VMHostStartPolicy&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostStartPolicy, Set-VMHostStartPolicy}        <br />&#160;&#160;&#160; 2 VMHostStorage&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostStorage, Set-VMHostStorage}        <br />&#160;&#160;&#160; 2 VMHostSysLogServer&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMHostSysLogServer, Set-VMHostSysLogSer&#8230;        <br />&#160;&#160;&#160; 2 VMQuestion&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMQuestion, Set-VMQuestion}        <br />&#160;&#160;&#160; 2 VMResourceConfiguration&#160;&#160; {Get-VMResourceConfiguration, Set-VMResource&#8230;        <br />&#160;&#160;&#160; 2 VMStartPolicy&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Get-VMStartPolicy, Set-VMStartPolicy}        <br />&#160;&#160;&#160; 1 VMScript&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Invoke-VMScript}        <br />&#160;&#160;&#160; 3 CustomField&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {New-CustomField, Remove-CustomField, Set-Cu&#8230;        <br />&#160;&#160;&#160; 1 DeployImageCache&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {Repair-DeployImageCache}        <br />&#160;&#160;&#160; 2 DeployRuleSetCompliance&#160;&#160; {Repair-DeployRuleSetCompliance, Test-Deploy&#8230;        <br />&#160;&#160;&#160; 1 ActiveDeployRuleSet&#160;&#160;&#160;&#160;&#160;&#160; {Switch-ActiveDeployRuleSet}        <br />&#160;&#160;&#160; 1 VMHostProfileCompliance&#160;&#160; {Test-VMHostProfileCompliance}</font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/943/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change PowerShell ISE Colors To Match the Console</title>
		<link>http://halr9000.com/article/939</link>
		<comments>http://halr9000.com/article/939#comments</comments>
		<pubDate>Mon, 11 Jul 2011 13:29:46 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[ise]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/939</guid>
		<description><![CDATA[Here’s a quick bit of code to change the color of PowerShell ISE’s output pane to match the colors used in the powershell.exe console: $psise.Options.OutputPaneBackgroundColor = &#34;#012456&#34; $psise.Options.OutputPaneTextBackgroundColor = &#34;#012456&#34; $psise.Options.OutputPaneForegroundColor = &#34;#eeedf0&#34; You can paste these lines into the editor pane and click the run botton to see how it looks. If you like [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>Here’s a quick bit of code to change the color of PowerShell ISE’s output pane to match the colors used in the powershell.exe console:</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;?="#ffffff;?" background-color:="background-color:" monospace;="monospace;" courier,="courier," New?,="New?," Courier="Courier"><span style="color: #800080">$psise</span>.Options.OutputPaneBackgroundColor <span style="color: pink">=</span> <span style="color: #800000">&quot;#012456&quot;</span>
<span style="color: #800080">$psise</span>.Options.OutputPaneTextBackgroundColor <span style="color: pink">=</span> <span style="color: #800000">&quot;#012456&quot;</span>
<span style="color: #800080">$psise</span>.Options.OutputPaneForegroundColor <span style="color: pink">=</span> <span style="color: #800000">&quot;#eeedf0&quot;</span></pre>
<p>You can paste these lines into the editor pane and click the run botton to see how it looks. If you like it, add these lines to your ISE profile (notepad $profile) and restart ISE to save the changes.</p>
<p><a href="http://halr9000.com/wp-content/uploads/2011/07/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2011/07/image_thumb.png" width="644" height="426" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/939/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quickly Duplicate Windows Features and Roles On Another Server Using PowerShell</title>
		<link>http://halr9000.com/article/934</link>
		<comments>http://halr9000.com/article/934#comments</comments>
		<pubDate>Fri, 20 May 2011 15:59:24 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ServerManager]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/934</guid>
		<description><![CDATA[If you have a server that needs to have the same Windows Server features and roles as another system, here’s an easy way to quickly get that done using PowerShell. I did this logged into each server locally, but you could easily use PowerShell remoting to do the same thing. Step 1: Run PowerShell with [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<a href="http://halr9000.com/article/category/software/windows" title="Windows"><img src="/wp-content/icons/topic_windows.gif" align="right" width="54" height="46" alt="Windows" /></a>
<p>If you have a server that needs to have the same Windows Server features and roles as another system, here’s an easy way to quickly get that done using PowerShell. I did this logged into each server locally, but you could easily use PowerShell remoting to do the same thing.</p>
<h3>Step 1: Run PowerShell with ServerManager module:</h3>
<p><a href="http://halr9000.com/wp-content/uploads/2011/05/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2011/05/image_thumb.png" width="353" height="501"/></a></p>
<h3>Step 2: Export list of currently installed features to XML</h3>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier>&nbsp;</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier>Get<span style="color: pink">-</span>WindowsFeature <span style="color: pink">|</span> <span style="color: pink">?</span> <span style="color: #000000">{</span> <a href="about:blank"><span style="color: #000080">$_</span></a>.installed <span style="color: #000000">}</span> <span style="color: pink">|</span> <span style="color: #008080; font-weight: bold">Export-Clixml</span> <a href="file://\\server\share\features.xml">\\server\share\features.xml</a></pre>
<h3>&nbsp;</h3>
<h3>Step 3: On second server, run PowerShell and import XML</h3>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier><span style="color: #800080"></span>&nbsp;</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier><span style="color: #800080">$f</span> <span style="color: pink">=</span> <span style="color: #008080; font-weight: bold">Import-Clixml</span> <a href="file://\\server\share\features.xml">\\server\share\features.xml</a></pre>
<h3>&nbsp;</h3>
<h3>Step 4: Pipe that bad boy into Add-WindowsFeature!</h3>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier><span style="color: #800080"></span>&nbsp;</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier><span style="color: #800080">$f</span> <span style="color: pink">|</span> Add<span style="color: pink">-</span>WindowsFeature</pre>
<h3>&nbsp;</h3>
<h3>Step 5: Restart, if needed</h3>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier>&nbsp;</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" #ffffff;? background-color: monospace; courier, New?, Courier>Restart<span style="color: pink">-</span>Computer</pre>
<p>That’s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/934/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Had a Great Time at TechEd!</title>
		<link>http://halr9000.com/article/930</link>
		<comments>http://halr9000.com/article/930#comments</comments>
		<pubDate>Thu, 19 May 2011 17:25:35 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[asides]]></category>
		<category><![CDATA[TechEd]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/930</guid>
		<description><![CDATA[I was only able to attend one full day of the show, but it was a pretty productive day for me. I gave a &#8220;birds of a feather&#8221; session to a packed room on Tuesday that was really well received. That was followed up with meeting with folks from Train Signal, Sapien, Cisco, amd several [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'asides' --><p>I was only able to attend one full day of the show, but it was a pretty productive day for me. I gave a &#8220;birds of a feather&#8221; session to a packed room on Tuesday that was really well received. That was followed up with meeting with folks from Train Signal, Sapien, Cisco, amd several others. Then, I hung out at the Powershell and Scripting Guys booths for a while. After lunch with Jason Shirk from the Powershell team, I met with Kirk Munro to get the skinny on PowerGUI Pro 3.0. I did record it for <a href="http://powerscripting.net">the podcast</a>, so look for that to be published to the site very soon.</p>
<p>Speaking of the podcast, I was able to meet some very interesting people who have committed to coming on the show to talk about what they are doing with Powershell! As always, follow our website for show news about upcoming guests.</p>
<p>While taking a break in the Connect Zone, I met up with my MVP lead. Garth put up a <a href="http://www.youtube.com/watch?v=XhUOvpncGmo&#038;feature=youtube_gdata_player">short video</a> where we talked about TechEd. I hope you find it interesting, or at least good fodder for making fun of me. <img src='http://halr9000.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Man, I need to blog more. Spoiled by Twitter!</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/930/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TechMentor is coming soon!</title>
		<link>http://halr9000.com/article/929</link>
		<comments>http://halr9000.com/article/929#comments</comments>
		<pubDate>Fri, 25 Feb 2011 03:50:14 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[asides]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/929</guid>
		<description><![CDATA[I’m not speaking this year, but I was really impressed when I spoke at TM Orlando a couple of years ago. You should check it out, and here’s a discount! You&#8217;re not too late for TechMentor Orlando (http://www.techmentorevents.com/orlando2011), March 14 &#8211; 18, 2011 at Disney&#8217;s Yacht Club. TechMentor is offering you the best discount so [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'VMware' --><!-- no icon for 'asides' --><p>I’m not speaking this year, but I was really impressed when I spoke at TM Orlando a couple of years ago. You should check it out, and here’s a discount!</p>
<p>You&#8217;re not too late for TechMentor Orlando (<a href="http://www.techmentorevents.com/orlando2011">http://www.techmentorevents.com/orlando2011</a>), March 14 &#8211; 18, 2011 at Disney&#8217;s Yacht Club.    <br />TechMentor is offering you the best discount so far &#8211; $400 discount off the 5 Day Best Value Conference Pass (discount applies to the Standard rate and new registrations only)! Register at <a href="http://bit.ly/TMReg">http://bit.ly/TMReg</a> with the code UGTM10 for the discount.    <br />If you&#8217;ve never attended it, TechMentor is 5 intensive and informative days of immediately-applicable training on today&#8217;s critical IT topics &#8211; everything from Active Directory to Virtualization &#8211; with a specific track and several sessions on PowerShell. Go to <a href="http://bit.ly/TMPwrShl">http://bit.ly/TMPwrShl</a> if you want to know more about sessions and speakers.</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/929/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kill that VM!</title>
		<link>http://halr9000.com/article/928</link>
		<comments>http://halr9000.com/article/928#comments</comments>
		<pubDate>Tue, 15 Feb 2011 04:06:44 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[stuck vm]]></category>
		<category><![CDATA[TrainSignal]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/928</guid>
		<description><![CDATA[That’s right, I’m going to go there—with PowerCLI! The topic of how to kill a stuck or hung VM has been done to death using SSH and a few arcane shell commands, or a long-running support script. But did you know you can do the same thing using PowerCLI? I’ll be teaching you how in [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'PowerCLI' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>That’s right, I’m going to go there—with <a href="http://vmware.com/go/powercli">PowerCLI</a>! The topic of how to kill a stuck or hung VM has been done to death using SSH and a few arcane shell commands, or a long-running support script. But did you know you can do the same thing using PowerCLI? I’ll be teaching you how in my latest PowerCLI training video from <a href="http://trainsignal.com">TrainSignal</a>. If I get the time, I’ll put put up a detailed blog post detailing how its done. For now though—just a tease. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://halr9000.com/wp-content/uploads/2011/02/wlEmoticon-smile1.png" /></p>
<p><a href="http://halr9000.com/wp-content/uploads/2011/02/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2011/02/image_thumb.png" width="644" height="484" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/928/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PowerCLI Quick Tip: Get VM Uptime</title>
		<link>http://halr9000.com/article/922</link>
		<comments>http://halr9000.com/article/922#comments</comments>
		<pubDate>Wed, 02 Feb 2011 20:21:23 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[uptime]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/922</guid>
		<description><![CDATA[Well, technically, it’s not uptime, it’s “last boot time”, but you know what I mean. I think this is much more useful than the number of seconds since the last boot anyway… $LastBootProp = @{ Name = 'LastBootTime' Expression = { ( Get-Date ) - ( New-TimeSpan -Seconds $_.Summary.QuickStats.UptimeSeconds ) } } Get-VM &#124; Get-View [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'PowerCLI' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'VMware' --><p>Well, technically, it’s not uptime, it’s “last boot time”, but you know what I mean. I think this is much more useful than the number of seconds since the last boot anyway…</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:4c80c01d-bdb3-411b-a65e-f811a74ba576" class="wlWriterEditableSmartContent">
<pre class="brush: perl; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 747px; height: 134px;" style=" width: 747px; height: 134px;overflow: auto;">$LastBootProp = @{
  Name = 'LastBootTime'
    Expression = {
      ( Get-Date ) - ( New-TimeSpan -Seconds $_.Summary.QuickStats.UptimeSeconds )
	}
}
Get-VM | Get-View | select Name, $LastBootProp</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>In case you are curious, a “quick tip” means that I don’t have time to write a longer post. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://halr9000.com/wp-content/uploads/2011/02/wlEmoticon-smile.png" /> Hey, it’s better than not sharing!</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/922/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Deleting Computer Objects with PowerShell</title>
		<link>http://halr9000.com/article/916</link>
		<comments>http://halr9000.com/article/916#comments</comments>
		<pubDate>Fri, 14 Jan 2011 15:41:41 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Quest AD Cmdlets;Active Directory;100-level]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/916</guid>
		<description><![CDATA[First of all—I feel like such a n00b to be posting this. It’s fair to say that I know a bit about PowerShell but, man, the world is so big and I certainly do not know it all. As I always say, if I didn’t learn something today, then I must be dead. Ok, on [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<a href="http://halr9000.com/article/category/software/windows" title="Windows"><img src="/wp-content/icons/topic_windows.gif" align="right" width="54" height="46" alt="Windows" /></a>
<p>First of all—I feel like such a n00b to be posting this. It’s fair to say that I know a bit about PowerShell but, man, the world is so big and I certainly do not know it all. As I always say, if I didn’t learn something today, then I must be dead.</p>
<p>Ok, on to the learning. As you may have heard, I changed jobs recently. I now work at a 500-person insurance company with a 70-person IT staff. By far the smallest company I’ve ever worked for (following MCI, HP, IBM, The Home Depot). In this new job, I have to wear many hats, which should be no surprise to those of you who work in SMB! I think it’s great, actually, because I’m exercising my brain in ways it hasn’t been in ages. For example, I don’t know crap about Active Directory, at least relative to other aspects of Windows considering the amount of time that I’ve called myself a Windows admin. So when it came time for me to do some routine AD cleanup, I certainly had to learn a few things—which is a good thing to me.</p>
<p>The task ahead of me was that there were tons of stale AD computer accounts in our domain. (See, I call it a domain, that’s how old my AD knowledge is.) Normally, this doesn’t hurt anything, but in our case, we have an anti-virus app which allocates licenses automatically based on the computer objects! So we were wasting licenses on computers which didn’t exist, and that needed cleaning up.</p>
<p>Of course, my first thought was to do it with PowerShell. I already had the venerable Quest AD snap-in loaded, so I just ran a quick one-liner to make my list of potential accounts. This was the easy part.</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?"><span style="color: #800080">$c</span> <span style="color: pink">=</span> Get<span style="color: pink">-</span>QADComputer <span style="color: pink">-</span>InactiveFor <span style="color: #804000">90</span></pre>
<p>After doing some sanity ping checks to make sure this list was good, I went to delete the first one:</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">PS<span style="color: pink">&gt;</span> <span style="color: #800080">$c</span><span style="color: #000000">[</span><span style="color: #804000">0</span><span style="color: #000000">]</span> <span style="color: pink">|</span> Remove<span style="color: pink">-</span>QADObject</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">&#160;&#160; </pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">Warning<span style="color: pink">!</span>
Are you sure you want to delete this object: CN<span style="color: pink">=</span>foobar<span style="color: pink">,</span>DC<span style="color: pink">=</span>domain<span style="color: pink">,</span>DC<span style="color: pink">=</span>com<span style="color: pink">?</span>
<span style="color: #000000">[</span>Y<span style="color: #000000">]</span> Yes  <span style="color: #000000">[</span>A<span style="color: #000000">]</span> Yes to All  <span style="color: #000000">[</span>N<span style="color: #000000">]</span> No  <span style="color: #000000">[</span>L<span style="color: #000000">]</span> No to All  <span style="color: #000000">[</span>S<span style="color: #000000">]</span> Suspend  <span style="color: #000000">[</span><span style="color: pink">?</span><span style="color: #000000">]</span> Help <span style="color: #000000">(</span>default is <span style="color: #800000">&quot;Y&quot;</span><span style="color: #000000">)</span>:
Remove<span style="color: pink">-</span>QADObject : The directory service can perform the requested operation only on a leaf object.
At line:<span style="color: #804000">1</span> char:<span style="color: #804000">25</span>
<span style="color: pink">+</span> <span style="color: #800080">$c</span><span style="color: #000000">[</span><span style="color: #804000">0</span><span style="color: #000000">]</span> <span style="color: pink">|</span> Remove<span style="color: pink">-</span>QADObject <span style="color: pink">&lt;&lt;&lt;&lt;</span>
    <span style="color: pink">+</span> CategoryInfo          : NotSpecified: <span style="color: #000000">(</span>:<span style="color: #000000">)</span> <span style="color: #000000">[</span>Remove<span style="color: pink">-</span>QADObject<span style="color: #000000">]</span><span style="color: pink">,</span> DirectoryServicesCOMException
    <span style="color: pink">+</span> FullyQualifiedErrorId : System.DirectoryServices.DirectoryServicesCOMException<span style="color: pink">,</span>Quest.ActiveRoles.ArsPowerShell
   eObjectCmdlet</pre>
<p>Oops, that didn’t work! Well, I did <a href="http://www.vistax64.com/powershell/200911-unable-delete-object-using-remove-qadobject.html">some research</a> and found an old newsgroup post that says that computer objects are really containers and that in order to delete them, you have to use the DeleteTree switch. So, I tried that:</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">PS<span style="color: pink">&gt;</span> <span style="color: #800080">$c</span><span style="color: #000000">[</span><span style="color: #804000">0</span><span style="color: #000000">]</span> <span style="color: pink">|</span> Remove<span style="color: pink">-</span>QADObject –DeleteTree</pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">&#160;&#160; </pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">Warning<span style="color: pink">!</span>
Are you sure you want to delete this object and its children: CN<span style="color: pink">=</span>foobar<span style="color: pink">,</span>DC<span style="color: pink">=</span>domain<span style="color: pink">,</span>DC<span style="color: pink">=</span>com<span style="color: pink">?</span>
<span style="color: #000000">[</span>Y<span style="color: #000000">]</span> Yes  <span style="color: #000000">[</span>A<span style="color: #000000">]</span> Yes to All  <span style="color: #000000">[</span>N<span style="color: #000000">]</span> No  <span style="color: #000000">[</span>L<span style="color: #000000">]</span> No to All  <span style="color: #000000">[</span>S<span style="color: #000000">]</span> Suspend  <span style="color: #000000">[</span><span style="color: pink">?</span><span style="color: #000000">]</span> Help <span style="color: #000000">(</span>default is <span style="color: #800000">&quot;Y&quot;</span><span style="color: #000000">)</span>:
Remove<span style="color: pink">-</span>QADObject : Access is denied. <span style="color: #000000">(</span>Exception from HRESULT: 0x80070005 <span style="color: #000000">(</span>E_ACCESSDENIED<span style="color: #000000">)</span><span style="color: #000000">)</span>
At line:<span style="color: #804000">1</span> char:<span style="color: #804000">25</span>
<span style="color: pink">+</span> <span style="color: #800080">$c</span><span style="color: #000000">[</span><span style="color: #804000">0</span><span style="color: #000000">]</span> <span style="color: pink">|</span> Remove<span style="color: pink">-</span>QADObject <span style="color: pink">&lt;&lt;&lt;&lt;</span>  <span style="color: pink">-</span>DeleteTree
    <span style="color: pink">+</span> CategoryInfo          : NotSpecified: <span style="color: #000000">(</span>:<span style="color: #000000">)</span> <span style="color: #000000">[</span>Remove<span style="color: pink">-</span>QADObject<span style="color: #000000">]</span><span style="color: pink">,</span> UnauthorizedAccessException
    <span style="color: pink">+</span> FullyQualifiedErrorId : System.UnauthorizedAccessException<span style="color: pink">,</span>Quest.ActiveRoles.ArsPowerShellSnapIn.Cmdlets.RemoveO
   bjectCmdlet</pre>
<p>Access denied! So, I tried an elevated shell. No help. Back to Google. I searched for “<a href="http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=unable+remove-qadobject+leaf#sclient=psy&amp;hl=en&amp;q=access+denied+remove-qadobject+deletetree&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;pbx=1&amp;psj=1&amp;fp=ee5b8d49ec6ea034">access denied remove-qadobject deletetree</a>” and the <a href="http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=unable+remove-qadobject+leaf#sclient=psy&amp;hl=en&amp;q=access+denied+remove-qadobject+deletetree&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;pbx=1&amp;psj=1&amp;fp=ee5b8d49ec6ea034">third hit</a> looked interesting. It was a section on working with computer objects in the book Active Directory Cookbook (awesome that google books does that). From reading this, I realized that somewhere in the permissions hierarchy, these computer objects had accidental deletion prevention enabled! Luckily, they had some PowerShell code that I quickly adapted to my situation:</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">PS<span style="color: pink">&gt;</span> <span style="color: #800080">$c</span> <span style="color: pink">|</span> Add<span style="color: pink">-</span>QADPermission <span style="color: pink">-</span>Account <span style="color: #800000">'EVERYONE'</span> <span style="color: pink">-</span>Rights <span style="color: #800000">'Delete,DeleteTree'</span> <span style="color: pink">-</span>ApplyTo <span style="color: #800000">'ThisObjectOnly'</span></pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?"><span style="color: #800000"></span>&#160;&#160; </pre>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">Ctrl   Account                                  Rights                              Source           AppliesTo
<span style="color: pink">----</span>   <span style="color: pink">-------</span>                                  <span style="color: pink">------</span>                              <span style="color: pink">------</span>           <span style="color: pink">---------</span>
       Everyone                                 Special                             Not inherited    This object only
       Everyone                                 Special                             Not inherited    This object only
       Everyone                                 Special                             Not inherited    This object only</pre>
<p>Plus 507 more lines just like that. And then, I tried again and…</p>
<pre style="font-family: consolas,; font-size: small" class="powershell" courier="courier" new?,="New?," courier,="courier," monospace;="monospace;" background-color:="background-color:" #ffffff;?="#ffffff;?">PS<span style="color: pink">&gt;</span> <span style="color: #800080">$c</span> <span style="color: pink">=</span> Get<span style="color: pink">-</span>QADComputer <span style="color: pink">-</span>InactiveFor <span style="color: #804000">90</span>
PS<span style="color: pink">&gt;</span> <span style="color: #800080">$c</span>
PS<span style="color: pink">&gt;</span> </pre>
<p>Success! I hope that this post that illustrates my learning process helps someone else who comes across the same situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/916/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How Can You Obtain PowerShell Training?</title>
		<link>http://halr9000.com/article/911</link>
		<comments>http://halr9000.com/article/911#comments</comments>
		<pubDate>Wed, 24 Nov 2010 14:33:00 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/911</guid>
		<description><![CDATA[I had a former co-worker ask me recently how a company in Atlanta could obtain training in PowerShell. I wanted to share the info here as well. Don Jones of Concentrated Tech offers onsite training as well as other services Don was the lead author for the official Microsoft (MOC) courseware for PowerShell, and he&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>I had a former co-worker ask me recently how a company in Atlanta could obtain training in PowerShell. I wanted to share the info here as well.</p>
<p></p>
<ul>
<li><a href="http://www.amazon.com/Windows-PowerShell-2-0-Don-Jones/dp/0982131429%3FSubscriptionId%3D0JTCV5ZMHMF7ZYTXGFR2%26tag%3Dtechprosaic-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0982131429"><img style="display: inline; float: right" align="right" src="http://ecx.images-amazon.com/images/I/51QDzFKHoKL._SL160_.jpg" /></a>Don Jones of Concentrated Tech offers <a href="http://concentratedtech.com/training/">onsite training</a> as well as other services Don was the lead author for the official Microsoft (MOC) courseware for PowerShell, and he&#8217;s one of the best IT speakers around. Co-author of PowerShell: TFM </li>
<li><a href="http://jdhitsolutions.com/blog/"></a><a href="http://www.amazon.com/Managing-Active-Directory-Windows-PowerShell/dp/0977659798%3FSubscriptionId%3D0JTCV5ZMHMF7ZYTXGFR2%26tag%3Dtechprosaic-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0977659798"><img style="display: inline; float: right" align="right" src="http://ecx.images-amazon.com/images/I/51S3YXwd8hL._SL160_.jpg" /></a>Jeff Hicks. The other half of PowerShell: TFM, and author of Managing Active Directory with PowerShell: TFM. (<a href="http://www.linkedin.com/in/jefferyhicks">linkedin profile</a>)&#160; </li>
<li>Global Knowledge has a <a href="http://www.globalknowledge.com/training/course.asp?pageid=9&amp;courseid=11107&amp;country=United+States">PowerShell course</a> </li>
<li>So does <a href="http://www.nhgeorgia.com/LocalWeb/catalog/CourseCatalog.aspx?GroupId=398&amp;keyword=powershell">New Horizons</a> </li>
<li><a href="http://www.trainsignal.com/VMware-vSphere-Pro-Series-Training-Vol-1.aspx"><img style="display: inline; float: right" alt="VMware vSphere Training" align="right" src="http://www.trainsignal.com/Assets/ProductImages/vmware_esx_vsphere_able_t.jpg" /></a>I myself produced a set of videos for <a href="http://trainsignal.com">Train Signal</a>. They are geared to VMware admins, so if you fit that bucket, you will like.</li>
</ul>
<ul>
<li><a href="http://www.trainsignal.com/VMware-vSphere-Pro-Series-Training-Vol-1.aspx">VMware vSphere Pro Vol. 1</a></li>
<li><a href="http://www.trainsignal.com/VMware-vSphere-Pro-Series-Training-Vol-2.aspx">VMware vSphere Pro Vol. 2</a></li>
</ul>
<li><a href="http://www.scriptinganswers.com/training.asp">SAPIEN</a> has self-paced training materials, as well as courseware. Of course you&#8217;d still need a trainer to go that route. </li>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/911/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quick PowerShell Tip: Echo Parameters Using psBoundParameters</title>
		<link>http://halr9000.com/article/912</link>
		<comments>http://halr9000.com/article/912#comments</comments>
		<pubDate>Wed, 24 Nov 2010 03:49:00 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[psboundparameters]]></category>
		<category><![CDATA[write-verbose]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/912</guid>
		<description><![CDATA[I’ll talk about this one in detail on an upcoming podcast. In the meantime, I’m afraid this will be a short post without my usual verbosity. However—verbosity just happens to be the subject of this post! If you put a line like the following in your script, and either set $verbosepreference to ‘conitnue’, or use [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>I’ll talk about this one in detail on an <a href="http://powerscripting.net">upcoming podcast</a>. In the meantime, I’m afraid this will be a short post without my usual verbosity. However—verbosity just happens to be the subject of this post!</p>
<p>If you put a line like the following in your script, and either set $verbosepreference to ‘conitnue’, or use a –Verbose flag on a function, you’ll get a nice echoing of your parameters back to the console. This can be helpful when debugging a script.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2a33adb3-2da5-4f3b-96fc-fe7ffcc2ce13" class="wlWriterEditableSmartContent">
<pre class="brush: powershell;">$psBoundParameters.GetEnumerator() | ForEach-Object { Write-Verbose "Parameter: $_" }

VERBOSE: Parameter: [ComputerName, cpliis3x]</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/912/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paper.Li, a Neat Way to Read Twitter</title>
		<link>http://halr9000.com/article/910</link>
		<comments>http://halr9000.com/article/910#comments</comments>
		<pubDate>Mon, 06 Sep 2010 20:08:50 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[doctordns]]></category>
		<category><![CDATA[newspaper]]></category>
		<category><![CDATA[paper.li]]></category>
		<category><![CDATA[powerscripting]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/910</guid>
		<description><![CDATA[I just read a blog post from Thomas Lee that talked about Paper.Li. I really like this site and thought I’d share as well. In particular, there is a feature to browse tweets by hashtag. I can see this as being really useful for me as I prepare the show notes for the PowerScripting Podcast [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'Internet' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>I just read a <a href="http://tfl09.blogspot.com/2010/09/paperli-organising-twitter-information.html">blog post</a> from <a href="http://twitter.com/doctordns">Thomas Lee</a> that talked about <a href="http://paper.li/">Paper.Li</a>. I really like this site and thought I’d share as well. In particular, there is a feature to browse tweets by hashtag. I can see this as being really useful for me as I prepare the show notes for the <a href="http://powerscripting.net">PowerScripting Podcast</a> (the #<a href="http://paper.li/tag/PowerShell">powershell tag</a>, of course). Here’s a screenshot:</p>
<p><a href="http://paper.li/tag/PowerShell"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2010/09/image.png" width="679" height="558" /></a></p>
<p>Go check out paper.li!</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/910/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick PowerCLI Tip: Determine vNetwork Teaming Uplinks for Distributed Virtual Switch PortGroups</title>
		<link>http://halr9000.com/article/903</link>
		<comments>http://halr9000.com/article/903#comments</comments>
		<pubDate>Sat, 17 Jul 2010 19:01:25 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[portgroup]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/903</guid>
		<description><![CDATA[Need to determine what the uplink policy is for your DVSwitches? Here is a quick PowerCLI snippet to do that. I’d go into more detail but I don’t have time this moment. Consider this longer than a tweet, but shorter than my normal blog post. Here is the corresponding screen in the vSphere Client (pardon [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'PowerCLI' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'VMware' --><p>Need to determine what the uplink policy is for your DVSwitches? Here is a quick <a href="http://vmware.com/go/powercli">PowerCLI</a> snippet to do that. I’d go into more detail but I don’t have time this moment. Consider this longer than a tweet, but shorter than my normal blog post. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://halr9000.com/wp-content/uploads/2010/07/wlEmoticonsmile.png" /></p>
<p>Here is the corresponding screen in the vSphere Client (pardon the font issues, I’m running blind-person-size-font) with the relevant portion highlighted:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="vSphere client screenshot" border="0" alt="vSphere client screenshot" src="http://halr9000.com/wp-content/uploads/2010/07/image.png" width="753" height="469" /></p>
<p>And the code:</p>
<pre><span style="color: #0000ff">PS</span><span style="color: #000000">&gt;</span><span style="color: #000000"> </span><span style="color: #800080">$pgName</span><span style="color: #000000"> </span><span style="color: #ff0000">=</span><span style="color: #000000"> </span><span style="color: #800000">'</span><span style="color: #800000">Name of your DV port group</span><span style="color: #800000">'</span><span style="color: #000000">
</span><span style="color: #0000ff">PS</span><span style="color: #000000">&gt;</span><span style="color: #000000"> </span><span style="color: #800080">$pg</span><span style="color: #000000"> </span><span style="color: #ff0000">=</span><span style="color: #000000"> </span><span style="color: #5f9ea0">Get-View</span><span style="color: #000000"> </span><span style="color: #5f9ea0">-ViewType</span><span style="color: #000000"> </span><span style="color: #0000ff">DistributedVirtualPortgroup</span><span style="color: #000000"> </span><span style="color: #5f9ea0">-Filter</span><span style="color: #000000"> </span><span style="color: #000000">@</span><span style="color: #000000">{ </span><span style="color: #0000ff">Name</span><span style="color: #000000"> </span><span style="color: #ff0000">=</span><span style="color: #000000"> </span><span style="color: #800080">$pgName</span><span style="color: #000000"> }
</span><span style="color: #0000ff">PS</span><span style="color: #000000">&gt;</span><span style="color: #000000"> </span><span style="color: #800080">$pg</span><span style="color: #000000">.</span><span style="color: #8b4513">Config</span><span style="color: #000000">.</span><span style="color: #8b4513">DefaultPortConfig</span><span style="color: #000000">.</span><span style="color: #8b4513">UplinkTeamingPolicy</span><span style="color: #000000">.</span><span style="color: #8b4513">UplinkPortOrder</span><span style="color: #000000">

</span><span style="color: #0000ff">ActiveUplinkPort</span><span style="color: #000000">  </span><span style="color: #000000">:</span><span style="color: #000000"> {</span><span style="color: #0000ff">dvUplink1</span><span style="color: #000000">,</span><span style="color: #000000"> </span><span style="color: #0000ff">dvUplink2</span><span style="color: #000000">}
</span><span style="color: #0000ff">StandbyUplinkPort</span><span style="color: #000000"> </span><span style="color: #000000">:</span><span style="color: #000000">
</span><span style="color: #0000ff">Inherited</span><span style="color: #000000">         </span><span style="color: #000000">:</span><span style="color: #000000"> </span><span style="color: #0000ff">True</span><span style="color: #000000">
</span><span style="color: #0000ff">DynamicType</span><span style="color: #000000">       </span><span style="color: #000000">:</span><span style="color: #000000">
</span><span style="color: #0000ff">DynamicProperty</span><span style="color: #000000">   </span><span style="color: #000000">:</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/903/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Book News</title>
		<link>http://halr9000.com/article/896</link>
		<comments>http://halr9000.com/article/896#comments</comments>
		<pubDate>Thu, 24 Jun 2010 15:13:04 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/896</guid>
		<description><![CDATA[There have been many book releases in the months since PowerShell V2 has been released, and there are several still in the works. It’s also neat to see all of the localized book projects—that really shows how important PowerShell is the entire world over. Here is a list of the books that I’ve heard about [...]]]></description>
			<content:encoded><![CDATA[<!-- no icon for 'Book' --><a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>There have been many book releases in the months since PowerShell V2 has been released, and there are several still in the works. It’s also neat to see all of the localized book projects—that really shows how important PowerShell is the entire world over. Here is a list of the books that I’ve heard about lately, in alpha order by title:</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="110">
<p align="center"><strong>Author</strong></p>
</td>
<td width="322">
<p align="center"><strong>Title</strong></p>
</td>
<td width="79">
<p align="center"><strong>Language</strong></p>
</td>
<td width="116">
<p align="center"><strong>Publisher</strong></p>
</td>
<td width="66">
<p align="center"><strong>Release</strong></p>
</td>
</tr>
<tr>
<td width="110">Ragnar Harper</td>
<td><a href="http://www.idgbooks.no/product_info.php?products_id=3815&amp;osCsid=649cb610ecfce511b1cc5623094c4b9b">Kom igang med Powershell 2.0</a></td>
<td>Norwegian</td>
<td width="116">IDG</td>
<td>&#160;</td>
</tr>
<tr>
<td width="110">Jeff Hicks</td>
<td width="322"><a href="http://www.sapienpress.com/">Managing Active Directory with Windows PowerShell: TFM 2nd edition</a></td>
<td>English</td>
<td width="116">&#160;</td>
<td width="66">&#160;</td>
</tr>
<tr>
<td>Soós Tibor</td>
<td><a href="http://www.iqjb.hu/UserFiles/book/Microsoft%20Powershell%202.0_v2.docx_HTML/Microsoft%20Powershell%202.0_v2.docx.htm">PowerShell 2.0 Theory and Practice (free ebook)</a></td>
<td>Hungarian</td>
<td width="116">Microsoft Magyarország</td>
<td>2010</td>
</tr>
<tr>
<td width="110">Don Jones, Jeff Hicks</td>
<td width="322"><a href="http://www.sapienpress.com/PowerShell3.asp">PowerShell 2.0: TFM</a></td>
<td>English</td>
<td width="116">SAPIEN Press</td>
<td width="66">Jan-10 </td>
</tr>
<tr>
<td width="110">Bruce Payette</td>
<td width="322"><a href="http://www.manning.com/payette2/">PowerShell in Action v2</a></td>
<td>English</td>
<td width="116">Manning</td>
<td width="66">Aug 2010 (est.)</td>
</tr>
<tr>
<td width="110">Richard Siddaway</td>
<td width="322"><a href="http://www.manning.com/siddaway/">PowerShell in Practice</a></td>
<td>English</td>
<td width="116">Manning</td>
<td width="66">Jun-10</td>
</tr>
<tr>
<td width="110">Tobias Weltner</td>
<td width="322"><a href="http://www.microsoft-press.de/product.asp?cnt=product&amp;id=ms-5669&amp;lng=0&amp;titel=Scripting">Scripting mit Windows PowerShell 2.0 &#8211; Schritt für Schritt</a></td>
<td>German</td>
<td width="116">MS Press Germany</td>
<td width="66">Jun-10</td>
</tr>
<tr>
<td width="110">Max Trinidad</td>
<td width="322">Teach Yourself PowerShell 2.0 in 24 Hours</td>
<td>English</td>
<td width="116">Sams</td>
<td width="66">2011</td>
</tr>
<tr>
<td width="110">Al Renouf, Luc Dekens</td>
<td width="322"><a href="http://www.virtu-al.net/2010/05/04/were-writing-a-book/">VMware vSphere PowerCLI Reference: Automating vSphere Administration</a></td>
<td>English</td>
<td width="116">Sybex</td>
<td width="66">1Q-2011</td>
</tr>
<tr>
<td width="110">Arnaud Petitjean &amp; Robin Lemesle</td>
<td width="322"><a href="http://www.editions-eni.fr/Livres/Windows-PowerShell-versions-1-et-2-Guide-de-reference-pour-l-administration-systeme/">Windows PowerShell (versions 1 et 2): guide référence pour l&#8217;administration système</a></td>
<td>French</td>
<td width="116">Editions ENI</td>
<td width="66">&#160;</td>
</tr>
<tr>
<td width="110">Steve Sequis</td>
<td width="322"><a href="http://www.dummies.com/store/product/Windows-PowerShell-2-For-Dummies.productCd-0470371986.html">Windows PowerShell 2 For Dummies</a> (note: released before PS v2 was complete)</td>
<td>English</td>
<td width="116">For Dummies</td>
<td width="66">Aug-2009</td>
</tr>
<tr>
<td width="110"><a name="RANGE!A12">Lee Holmes</a></td>
<td width="322"><a href="http://oreilly.com/catalog/9780596801519/">Windows PowerShell Cookbook, 2nd Ed.</a></td>
<td>English</td>
<td width="116">O&#8217;Reilly</td>
<td width="66">Aug-10</td>
</tr>
</tbody>
</table>
<p>If you know of any that I have missed, please let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/896/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Security Authorization in vSphere</title>
		<link>http://halr9000.com/article/894</link>
		<comments>http://halr9000.com/article/894#comments</comments>
		<pubDate>Thu, 24 Jun 2010 02:14:18 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[train signal]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/894</guid>
		<description><![CDATA[I thought I’d share another slide with you tonight. This is also from my upcoming Train Signal vSphere Pro video. Before tackling a set of PowerCLI cmdlets, I like to give you a good base understanding of the concepts.]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'Screencast' --><!-- no icon for 'VMware' --><p>I thought I’d share another slide with you tonight. This is also from my upcoming <a href="http://trainsignal.com">Train Signal</a> vSphere Pro video. Before tackling a set of <a href="http://vmware.com/go/powercli">PowerCLI</a> cmdlets, I like to give you a good base understanding of the concepts.</p>
<p><a href="http://halr9000.com/wp-content/uploads/2010/06/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2010/06/image_thumb1.png" width="644" height="484" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/894/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Get-Stat cmdlet is a bit hard to work with</title>
		<link>http://halr9000.com/article/890</link>
		<comments>http://halr9000.com/article/890#comments</comments>
		<pubDate>Sat, 19 Jun 2010 19:32:53 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/890</guid>
		<description><![CDATA[As evidenced by the slide I’m working on at the moment for the upcoming TrainSignal vSphere Pro Series lesson titled “Performance with PowerCLI”. I really wanted to use stars for the difficulty level and make them vibrate like they do in the game, but I was spending too much time on this slide as it [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'Screencast' --><!-- no icon for 'VMware' --><p>As evidenced by the slide I’m working on at the moment for the upcoming <a href="http://www.trainsignal.com/VMware-vSphere-Pro-Series-Training-Vol-1-P91.aspx">TrainSignal vSphere Pro Series</a> lesson titled “Performance with PowerCLI”.</p>
<p>I really wanted to use stars for the difficulty level and make them vibrate like they do in the game, but I was spending too much time on this slide as it was. <img src='http://halr9000.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://halr9000.com/wp-content/uploads/2010/06/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://halr9000.com/wp-content/uploads/2010/06/image_thumb.png" width="644" height="484" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/890/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Range of Letters, an Alternate Method</title>
		<link>http://halr9000.com/article/877</link>
		<comments>http://halr9000.com/article/877#comments</comments>
		<pubDate>Tue, 11 May 2010 01:26:16 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/877</guid>
		<description><![CDATA[PowerShell.com just posted a tip today on how to create a range of letters. The tip looks like this: 65..90 &#124; Foreach-Object { &#34;$([char]$_):&#34; } That works fine, but I have another way to share with you in case you don’t want to look up the ASCII values every time. This is very similar to [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<p>PowerShell.com just posted <a href="http://powershell.com/cs/blogs/tips/archive/2010/05/10/creating-range-of-letters.aspx">a tip today</a> on how to create a range of letters. The tip looks like this:</p>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">65..90 | Foreach-Object { <span style="color: #006080">&quot;$([char]$_):&quot;</span> }</pre>
<p></div>
</p>
<p>That works fine, but I have another way to share with you in case you don’t want to look up the ASCII values every time. This is very similar to a technique used in my <a href="http://halr9000.com/article/859">Random Letters</a> post of not too long ago:</p>
<div>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">[char[]]([char]<span style="color: #006080">'a'</span>..[char]<span style="color: #006080">'z'</span>)</pre>
</div>
<div>&#160;</div>
<div>That prints each letter on a line. If you’d like them in a row, cast the whole thing to a string:</div>
<div>&#160;</div>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">[string]( [char[]]([char]<span style="color: #006080">'a'</span>..[char]<span style="color: #006080">'z'</span>) )</pre>
</div>
<div>&#160;</div>
<div>Or, you can place it within a sub-expression, and quotes:</div>
<div>&#160;</div>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><span style="color: #006080">&quot;$([char[]]([char]'a'..[char]'z'))&quot;</span></pre>
</div>
<div>&#160;</div>
<div>Read my original post for an explanation of how this method works. PowerShell is a very flexible language, and as they say, there’s more than one way to skin a cat!</div>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/877/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IPconfig in PowerShell</title>
		<link>http://halr9000.com/article/872</link>
		<comments>http://halr9000.com/article/872#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:17:06 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Powershell Ideas]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/872</guid>
		<description><![CDATA[First, let me give credit up front that this tip was inspired by one or two recent Power Tips from PowerShell.com. With that out of the way, I wanted to show you real quick that if you want the sort of information that you get from ipconfig.exe, then the command is even simpler: PS &#62; [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'Powershell Ideas' --><p>First, let me give credit up front that this tip was inspired by <a href="http://powershell.com/cs/blogs/tips/archive/2010/04/20/getting-assigned-ip-addresses.aspx">one</a> or <a href="http://powershell.com/cs/blogs/tips/archive/2010/04/21/ipv4-address-lists.aspx">two</a> recent Power Tips from PowerShell.com.</p>
<p>With that out of the way, I wanted to show you real quick that if you want the sort of information that you get from ipconfig.exe, then the command is even simpler:</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">PS &gt; gwmi win32_networkadapterconfiguration | ? { $_.IPAddress }

DHCPEnabled      : True</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">IPAddress        : {151.140.143.41}</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DefaultIPGateway : {151.140.142.1}</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DNSDomain        : halr9000.com</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">ServiceName      : b57w2k</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Description      : Broadcom NetXtreme Gigabit Ethernet - Packet Scheduler Miniport</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Index            : 8

DHCPEnabled      : True</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">IPAddress        : {151.140.143.41}</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DefaultIPGateway : {151.140.142.1}</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DNSDomain        : whatever.<span style="color: #0000ff;">local</span></pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;"> </span>ServiceName      : AR5416</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Description      : Broadcom NetXtreme Gigabit Ethernet - Packet Scheduler Miniport</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Index            : 10</pre>
</div>
<p>You can rely on the default output of the Win32_NetworkAdapterConfiguration WMI class to display some of the more important bits here—just like ipconfig. But what if you want more—in other words, “ipconfig /all”? That data is already in there, but it’s not displayed to the screen by default. To get at it, you can pipe to Format-List and stick an asterisk at the end to tell it to display everything, like so:</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">PS &gt; gwmi win32_networkadapterconfiguration | ? { $_.IPAddress } | fl *

DHCPLeaseExpires             : 20100427081921.000000-240</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Index                        : 8</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Description                  : Broadcom NetXtreme Gigabit Ethernet - Packet Scheduler Miniport</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DHCPEnabled                  : True</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DHCPLeaseObtained            : 20100421081921.000000-240</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">DHCPServer                   : 165.130.252.36</pre>
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">...</pre>
</div>
<p>I used a couple of aliases in the above examples because it saves typing. To be clear for those who don’t know them, here are the definitions:</p>
<p>gwmi = Get-WmiObject</p>
<p>? = Where-Object</p>
<p>fl = Format-List</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/872/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please vote for my PowerCLI Codestock session!</title>
		<link>http://halr9000.com/article/870</link>
		<comments>http://halr9000.com/article/870#comments</comments>
		<pubDate>Sat, 13 Mar 2010 18:43:53 +0000</pubDate>
		<dc:creator>halr9000</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://halr9000.com/article/870</guid>
		<description><![CDATA[If you are in the Southeast US, you may be interested in the upcoming Codestock event coming up in June in Knoxville, TN. It seems to be heavily slanted towards developers, but they are doing IT Pro and Entrepeneur tracks this year as well. I have submitted one session for my Managing VMware with PowerShell [...]]]></description>
			<content:encoded><![CDATA[<a href="http://halr9000.com/article/category/programming/scripting/powershell" title="Powershell"><img src="/wp-content/icons/topic_powershell.png" align="right" width="70" height="53" alt="Powershell" /></a>
<!-- no icon for 'VMware' --><p>If you are in the Southeast US, you may be interested in the upcoming <a href="http://codestock.org">Codestock</a> event coming up in June in Knoxville, TN. It seems to be heavily slanted towards developers, but they are doing IT Pro and Entrepeneur tracks this year as well. I have submitted one session for my <a href="http://codestock.org/sessions/managing-vmware-with-windows-powershell-and-powercli.aspx">Managing VMware with PowerShell thing</a>. If you have a minute, please go over to the site to register and vote my session up. </p>
<p>I’ve never been to Codestock before, but it looks like fun. In fact, it looks like a lot more fun than your typical canned vendor convention. I don’t plan on doing many speaker engagements this year aside from the occasional <a href="http://atlsmug.org">SMUG</a> or <a href="http://powershellgroup.org/atlanta.ga">APUG</a> meeting here in Atlanta, but I thought going to Knoxville might be a neat excuse to get out an d see a new city. The drive to Knoxville from Atlanta is pretty nice if you go through Chattahoochee and Nantahala national forests, so we are looking forward to that.</p>
<p><img src="http://l.yimg.com/g/images/spaceball.gif" /><img src="http://l.yimg.com/g/images/spaceball.gif" /></p>
</p>
<p><img src="http://l.yimg.com/g/images/spaceball.gif" /><img src="http://l.yimg.com/g/images/spaceball.gif" /></p>
</p>
<p><img alt="Brasstown Bald Road by tfdavis." src="http://farm4.static.flickr.com/3115/3159556923_248f4a319f.jpg" /></p>
<p>(credit <a href="http://www.flickr.com/photos/tfdavis/3159556923/">tfdavis on flickr</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://halr9000.com/article/870/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

