<?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>SnapIn Archives - LucD notes</title>
	<atom:link href="https://www.lucd.info/category/powershell/snapin/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/category/powershell/snapin/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Wed, 08 Apr 2020 10:19:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.lucd.info/wp-content/uploads/2018/12/cropped-120px-Tibetan_Dharmacakra-32x32.png</url>
	<title>SnapIn Archives - LucD notes</title>
	<link>https://www.lucd.info/category/powershell/snapin/</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>Universal PowerCLI Loader</title>
		<link>https://www.lucd.info/2016/05/05/universal-powercli-loader/</link>
					<comments>https://www.lucd.info/2016/05/05/universal-powercli-loader/#comments</comments>
		
		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Thu, 05 May 2016 18:50:47 +0000</pubDate>
				<category><![CDATA[Module]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SnapIn]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Initialization]]></category>
		<category><![CDATA[Loader]]></category>
		<category><![CDATA[PSSnapin]]></category>
		<guid isPermaLink="false">http://www.lucd.info/?p=5181</guid>

					<description><![CDATA[PowerCLI is great tool, and the Team behind it surprises us on a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://communities.vmware.com/community/vmtn/automationtools/powercli/overview" target="_blank">PowerCLI</a> is great tool, and the <a href="https://www.lucd.info/2014/03/15/powercli-5-5-r2-they-do-listen-to-you/" target="_blank">Team</a> behind it surprises us on a regular basis with a new Release. With the <strong>v6.x</strong> generation we witnessed the introduction of <strong>Modules</strong>. And the Team keeps adding further integration with other VMware products.</p>
<p>With the PowerCLI installation comes a shortcut to a PowerShell sessions, loaded with all the PowerCLI goodness. And this is ideal to make your first steps in the wonderful world of PowerShell and PowerCLI.</p>
<p>But soon you&#8217;ll start using more advanced features of PowerShell. You&#8217;ll be scheduling jobs, running parallel workflows, start using PowerCLI in Desired State Configuration (DSC). At that moment, the simple PowerCLI session doesn&#8217;t cut it anymore, and even the Init scripts that are installed together with PowerCLI, will not give you the exact environment as you want it. Hence my <strong>Universal PowerCLI Loader</strong>!</p>
<p><a href="https://www.lucd.info/2016/05/05/universal-powercli-loader/universal/" rel="attachment wp-att-5182"><img fetchpriority="high" decoding="async" class="alignnone wp-image-5182 size-medium" src="https://lucd.info/wp-content/uploads/2016/05/universal-300x250.jpg" alt="universal" width="300" height="250" srcset="https://www.lucd.info/wp-content/uploads/2016/05/universal-300x250.jpg 300w, https://www.lucd.info/wp-content/uploads/2016/05/universal.jpg 373w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>I have been using a &#8220;<strong>Universal PowerCLI loader</strong>&#8221; function since quite some time now. I thought it was time to prettify it a bit, and share it with the community.</p>
<p><span id="more-5181"></span></p>
<p>To create the <strong>Universal PowerCLI loader</strong>, I first needed to take stock of what all the different <a href="https://communities.vmware.com/community/vmtn/automationtools/powercli/overview" target="_blank">PowerCLI</a> versions require and bring. The result of that inquiry is reflected in the following spreadsheet.</p>
<div class="ead-preview"><div class="ead-document" style="position: relative;padding-top: 90%;"><iframe src="//view.officeapps.live.com/op/embed.aspx?src=https%3A%2F%2Flucd.info%2Fwp-content%2Fuploads%2F2016%2F05%2FPowerCLI-Releases.xlsx" title="Embedded Document" class="ead-iframe" style="width: 100%;height: 100%;border: none;position: absolute;left: 0;top: 0;"></iframe></div><p class="embed_download"><a href="https://lucd.info/wp-content/uploads/2016/05/PowerCLI-Releases.xlsx" download>Download [13.03 KB] </a></p></div>
<p>Some clarifications on the table:</p>
<p><strong>Columns E, F and G</strong>: contain hyperlinks to the respective Release Notes, Download link and Online Helppage for each PowerCLI release. Note that the download will require you to enter a MyVMware account.</p>
<p><strong>Columns H and I</strong>: the minimum and maximum supported PowerShell version</p>
<p><strong>Columns J and K</strong>: the minimum and maximum supported OS (for workstations) on which you can use PowerCLI</p>
<p><strong>Columns L till P</strong>: the required .Net version</p>
<p><strong>Columns Q and R</strong>: the minimum and maximum supported vSphere version. These are just an indication, always use the <a href="https://www.vmware.com/resources/compatibility/sim/interop_matrix.php" target="_blank">VMware Product Interoperability Matrixes</a> to determine which version is required.</p>
<p><strong>Columns U and V</strong>: the number of cmdlets available for the &#8220;regular&#8221; modules and for the &#8220;Cloud&#8221; modules. To get the total number of cmdlets in a specific release, add these two numbers together.</p>
<p>Some interesting observations that can be made from this table:</p>
<ul>
<li>The table starts with <strong>PowerCLI 5.1.0.2</strong>, since I personally think you should never need an older version. If you do, let me know, and I&#8217;ll see if I can expand the table and the function.</li>
<li>Notice that with <strong>PowerCLI 5.8</strong> a separate installation for PowerCLI for Tenants was introduced (row 7)</li>
<li>With the <strong>PowerCLI v6.x</strong> series, modules were introduced</li>
<li>Not all cmdlets are currently migrated from PSSnapins to Modules, hence the mix of PSSnapin and Modules</li>
<li><strong>WMF 5</strong> support is included from the PowerCLI v6.3. Note that this is for the WMF 5 that comes with Windows 10. The WMF 5 that is still in preview, and that will probably be released with Windows 2016, is not yet officially supported</li>
</ul>
<h2>The Function</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">function Enable-PowerCLI
{
&lt;# .SYNOPSIS Load PowerCLI modules and PSSnapins .DESCRIPTION This function will load all requested PowerCLI modules and PSSnapins. The function will, depending on the installed PowerCLI version, determine what needs to be loaded. .NOTES Author: Luc Dekens .PARAMETER Cloud Switch to indicate if the Cloud related cmdlets shall be loaded .PARAMETER InitScript The PowerCLI PSSnapin have associated initialisation scripts. This switch will indicate if that script needs to be executed or not. .EXAMPLE PS&gt; Enable-PowerCLI
.EXAMPLE
  PS&gt; Enable-PowerCLI -Cloud
#&gt;

  [CmdletBinding()]
  param(
    [Switch]$Cloud,
    [Switch]$InitScript
  )

  $PcliPssnapin = @{
    'VMware.VimAutomation.License' = @(2548067)
    'VMware.DeployAutomation' =@(2548067,3056836,3205540,3737840)
    'VMware.ImageBuilder' = @(2548067,3056836,3205540,3737840)
  }

  $PcliModule = @{
    'VMware.VimAutomation.Core' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.Vds' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.Cloud' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.PCloud' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.Cis.Core' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.Storage' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.HA' = @(2548067,3056836,3205540,3737840)
    'VMware.VimAutomation.vROps' = @(3056836,3205540,3737840)
    'VMware.VumAutomation' = @(3056836,3205540,3737840)
    'VMware.VimAutomation.License' = @(3056836,3205540,3737840)
  }

  # 32- or 64-bit process
  $procArch = (Get-Process -Id $pid).StartInfo.EnvironmentVariables[&quot;PROCESSOR_ARCHITECTURE&quot;]
  if($procArch -eq 'x86'){
    $regPath = 'HKLM:\Software\VMware, Inc.\VMware vSphere PowerCLI'
  }
  else{
    $regPath = 'HKLM:\Software\WOW6432Node\VMware, Inc.\VMware vSphere PowerCLI'
  }
  
  # Check if PowerCLI (regular or Tenant) is installed
  if(!(Test-Path -Path $regPath))
  {
    $regPath = $regPath.Replace('VMware vSphere PowerCLI','VMware vSphere PowerCLI for Tenants')
    if(!(Test-Path -Path $regPath))
    {
        Throw 'Can not find a PowerCLI installation!'        
    }
  }
  
  # Get build
  $buildKey = 'InstalledBuild'
  Try{
    $pcliBuild = Get-ItemProperty -Path $regPath -Name $buildKey |
        Select -ExpandProperty $buildKey -ErrorAction Stop
  }
  Catch{
    Throw &quot;PowerCLI doesn't seem to be installed on this system!&quot;
  }

  # Get installation path
  $installPathKey = 'InstallPath'
  Try{
    $pcliInstallPath = Get-ItemProperty -Path $regPath -Name $installPathKey |
        Select -ExpandProperty $installPathKey -ErrorAction Stop
  }
  Catch{
    Throw &quot;PowerCLI doesn't seem to be installed on this system!&quot;
  }

  # Load modules
  if($pcliBuild -ge 2548067)
  {
    $loadedModule = Get-Module -Name VMware* -ErrorAction SilentlyContinue | %{$_.Name}
    if($loadedModule -and $pcliBuild -ge 3737840)
    {
      $loadedModule = $loadedModule | where{$_ -notmatch 'Common$|SDK$'}
    }
  
    $targetModule = $PcliModule.GetEnumerator() | where{$_.Value -contains $pcliBuild} | %{$_.Key}
    $targetModule = $targetModule | where{$loadedModule -notcontains $_}
    if(!$Cloud)
    {
      $targetModule = $targetModule | where{$_ -notmatch 'Cloud'}
    }
    if($targetModule)
    {
      $targetModule | where{$loadedModule -notcontains $_.Name} | %{
        Import-Module -Name $_ -Verbose:$false
      }
    }
  }
  
  # Load PSSnapin
  $loadedSnap = Get-PSSnapin -Name VMware* -ErrorAction SilentlyContinue | %{$_.Name}
  if($pcliBuild -ge 3737840)
  {
    $loadedSnap = $loadedSnap | where{$_ -notmatch 'Core$'}
  }

  $targetSnap = $PcliPssnapin.GetEnumerator() | where{$_.Value -contains $pcliBuild} | %{$_.Key}
  $targetSnap = $targetSnap | where{$loadedSnap -notcontains $_}
  if(!$Cloud)
  {
    $targetSnap = $targetSnap | where{$_ -notmatch 'Cloud'}
  }
  if($targetSnap)
  {
    $targetSnap | where{$loadedSnap -notcontains $_} | %{
      Add-PSSnapin -Name $_ -Verbose:$false

      # Run initialisation script
      if($InitScript)
      {
        $filePath = &quot;{0}Scripts\Initialize-{1}.ps1&quot; -f $pcliInstallPath,$_.ToString().Replace(&quot;.&quot;, &quot;_&quot;)
        if (Test-Path $filePath) {
          &amp; $filePath
        }
      }
    }
  }
}</pre><p></p>
<h3>Annotations</h3>
<p><strong>Line 27-44</strong>: in these tables the relation between the PowerCLI version and the required modules and PSSnapin are defined</p>
<p><strong>Line 47-53</strong>: depending if the PowerShell session is a 32- or 64-bit process, another registry branch needs to be accessed.</p>
<p><strong>Line 56-63</strong>: check if PowerCLI, or PowerCLI for Tenants, is actually installed on the station before continuing</p>
<p><strong>Line 66-83</strong>: the buildnumber and the installation path are retrieved from the registry</p>
<p><strong>Line 86-106</strong>: loads the requested PowerCLI modules, if we are in a PowerCLI v6.x environment. The logic first determines which modules are available, then substracts the ones that are already loaded and finally loads the missing ones. This means that the function can be called more than once.</p>
<p><strong>Line 94</strong>: in combination with the table, define earlier, this line will check for each known PowerCLI module, if it is present in the current PowerCLI installation.</p>
<p><strong>Line 109-135</strong>: similar logic as before with the modules, to load the required PowerCLI PSSnapins.</p>
<p><strong>Line 127-133</strong>: execute the PSSnapin initialisation scripts if requested. The default is not to run these scripts.</p>
<h2>Sample Usage</h2>
<p>The purpose of the function is quite straightforward, it loads the PowerCLI PSSnapin and modules. The call to the function can be placed in the beginning of your scripts. No more need to handle the loading of PowerCLI in your scripts.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Enable-PowerCLI</pre><p></p>
<p>This will load all PowerCLI PSSnapins and modules, depending on the installed PowerCLI version, minus the Cloud related modules and PSSnapins.</p>
<p>If you need the Cloud functionality, you just need to do</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Enable-PowerCLI -Cloud</pre><p></p>
<p>The <strong>Enable-PowerCLI</strong> function is available on my Github <a href="https://github.com/lucdekens/Scripts.git" target="_blank">Scripts</a> repository.</p>
<p>Note that the <strong>Enable-PowerCLI</strong> function can <strong>not</strong> be added to a module. The <strong>Add-PSSnapin</strong> cmdlets executed inside a module, are not propagated to the caller!<br />
This is a know, unresolved issue.</p>
<p>Enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lucd.info/2016/05/05/universal-powercli-loader/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>PowerCLI cmdlet XRef &#8211; Another look</title>
		<link>https://www.lucd.info/2011/03/04/powercli-cmdlet-xref-another-look/</link>
					<comments>https://www.lucd.info/2011/03/04/powercli-cmdlet-xref-another-look/#comments</comments>
		
		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Fri, 04 Mar 2011 14:59:26 +0000</pubDate>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SnapIn]]></category>
		<category><![CDATA[metadata]]></category>
		<guid isPermaLink="false">http://www.lucd.info/?p=3136</guid>

					<description><![CDATA[This post was triggered by a question in the PowerCLI Community around the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This post was triggered by a <a href="https://communities.vmware.com/thread/305040?tstart=0" target="_blank">question</a> in the <a href="https://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli?view=discussions" target="_blank">PowerCLI Community</a> around the <a href="https://msdn.microsoft.com/en-us/library/bb204629(v=VS.85).aspx" target="_blank">ConfirmImpact</a> attribute for PowerCLI cmdlets.<br />
In PowerShell you can access the metadata of each cmdlet and extract quite a bit of useful information.<br />
So I decided to have a look how I could use this cmdlet metadata to produce an alternative cmdlet reference for the PowerCLI cmdlets.<br />
The list my script produces is <strong>NOT</strong> intended as a replacement for the excellent <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/index.html" target="_blank">PowerCLI Reference</a>. It is intended for those who already know what a PowerCLI cmdlet does but want to access parameter information quickly. It condences a lot of information in a spreadsheet.</p>
<h2><span id="more-3136"></span>The script</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Get-Command -Module VMware.VimAutomation.Core | %{
	$meta = New-Object System.Management.Automation.CommandMetadata (Get-Command $_.Name)
	$paramNr = 0
	$meta.Parameters.GetEnumerator() | %{
		$attribute = $_.Value.Attributes | where {$_.GetType().Name -eq &quot;ParameterAttribute&quot;}
		Select -InputObject $_ `
			-Property @{N=&quot;Cmdlet&quot;;E={if($paramNr -eq 0){$meta.Name}}},
				@{N=&quot;Parameter Name&quot;;E={$_.Key}},
				@{N=&quot;Parameter Aliases&quot;;E={[string]::Join(',',($_.Value.Aliases.GetEnumerator() | %{$_}))}},
				@{N=&quot;ParameterSets&quot;;E={[string]::Join(',',($_.Value.ParameterSets.GetEnumerator() | where {$_.Key -ne &quot;__AllParameterSets&quot;} | %{$_.Key}))}},
				@{N=&quot;ConfirmImpact&quot;;E={if($paramNr -eq 0){$meta.ConfirmImpact}}},
				@{N=&quot;OBN&quot;;E={if(($_.Value.Attributes | where {$_.GetType().Name -eq &quot;ObnArgumentTransformationAttribute&quot;})){$true}else{$false}}},
				@{N=&quot;Mandatory&quot;;E={$attribute.Mandatory}},
				@{N=&quot;Pipeline&quot;;E={$attribute.ValueFromPipeline}},
				@{N=&quot;Position&quot;;E={if($attribute.Position -ne 0x80000000){$attribute.Position}}}
		$paramNr++
	}
} | Export-Csv &quot;C:\PowerCLI-Xref.csv&quot; -NoTypeInformation -UseCulture</pre><p></p>
<h4>Annotations</h4>
<p><strong>Line 2</strong>:  With the <a href="https://msdn.microsoft.com/en-us/library/dd144506(v=VS.85).aspx" target="_blank">System.Management.Automation.CommandMetadata</a> object we gain access to the cmdlet metadata.</p>
<p><strong>Line 4</strong>: The Parameters property gives access to a hash table that holds all the information we are after.</p>
<p><strong>Line 12</strong>: The OBN attribute indicates if for that specific parameter the value can be provided as an Object By Name.</p>
<p><strong>Line 15</strong>: A parameter that is not a positional parameter will have the value 0x80000000</p>
<h2>The file</h2>
<p>The CSV file that the script produces looks like this</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-global.png"><img decoding="async" class="alignnone size-full wp-image-3138" title="xref-global" src="https://lucd.info/wp-content/uploads/2011/03/xref-global.png" alt="" width="801" height="306" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-global.png 1001w, https://www.lucd.info/wp-content/uploads/2011/03/xref-global-300x114.png 300w" sizes="(max-width: 801px) 100vw, 801px" /></a></p>
<p>You can see all the PowerCLI cmdlets, the parameter sets that exist for a cmdlet, the eventual aliases that exist, the confirmimpact setting,  if you can pass a specific parameter as an Object By Name, if the parameter is mandatory, if a parameter accepts pipeline input and finally the position number if it concerns a positional parameter.</p>
<h2>Oddities</h2>
<p>When you look closer at the CSV file you will notice that there are some oddities present. Most probably, the majority of these slipped it between successive PowerCLI builds. A short overview of what I noticed. Feel free to mention others in a comment.</p>
<h3>Alias names</h3>
<p>To say the least, they are not really consistent.</p>
<p>You would assume that the VMHost parameter has alias called Host. With most of the cmdlets that is the case, but there are exceptions.</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-alias.png"><img decoding="async" class="alignnone size-full wp-image-3143" title="xref-alias" src="https://lucd.info/wp-content/uploads/2011/03/xref-alias.png" alt="" width="366" height="232" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-alias.png 457w, https://www.lucd.info/wp-content/uploads/2011/03/xref-alias-300x190.png 300w" sizes="(max-width: 366px) 100vw, 366px" /></a></p>
<h3>Parameter sets</h3>
<p>This handy feature seems to have some quirks as well.</p>
<p>Why would the RunAsync parameter have a dedicated parameter set for the <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/Move-Datacenter.html" target="_blank">Move-Datacenter</a> cmdlet ?</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-pset1.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3144" title="xref-pset1" src="https://lucd.info/wp-content/uploads/2011/03/xref-pset1.png" alt="" width="454" height="64" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-pset1.png 568w, https://www.lucd.info/wp-content/uploads/2011/03/xref-pset1-300x42.png 300w" sizes="auto, (max-width: 454px) 100vw, 454px" /></a></p>
<p>Why does the DistributedSwitch parameter belong to a seperate parameter set on the <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/New-NetworkAdapter.html" target="_blank">New-NetworkAdapter</a> cmdlet but not on the <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/Set-NetworkAdapter.html" target="_blank">Set-NetworkAdapter</a> ?</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-pset21.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3146" title="xref-pset2" src="https://lucd.info/wp-content/uploads/2011/03/xref-pset21.png" alt="" width="453" height="277" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-pset21.png 566w, https://www.lucd.info/wp-content/uploads/2011/03/xref-pset21-300x183.png 300w" sizes="auto, (max-width: 453px) 100vw, 453px" /></a></p>
<h3>Confirm impact</h3>
<p>Some of these settings do not look consistent and logical to me. What are the criteria to decide if the impact is Low, Medium or High ?</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-confirm.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3147" title="xref-confirm" src="https://lucd.info/wp-content/uploads/2011/03/xref-confirm.png" alt="" width="549" height="152" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-confirm.png 686w, https://www.lucd.info/wp-content/uploads/2011/03/xref-confirm-300x83.png 300w" sizes="auto, (max-width: 549px) 100vw, 549px" /></a></p>
<h3>Postional parameters</h3>
<p>The Position of a parameter is indicated with an integer, which starts at 0.</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-position.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3149" title="xref-position" src="https://lucd.info/wp-content/uploads/2011/03/xref-position.png" alt="" width="640" height="170" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-position.png 800w, https://www.lucd.info/wp-content/uploads/2011/03/xref-position-300x79.png 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>When you display the parameters with the <strong>Get-Help</strong> cmdlet, the position index is incremented by 1. This leads to the funny situation that you have no positional parameter in position 1.</p>
<p><a href="https://lucd.info/wp-content/uploads/2011/03/xref-help-position.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3150" title="xref-help-position" src="https://lucd.info/wp-content/uploads/2011/03/xref-help-position.png" alt="" width="612" height="110" srcset="https://www.lucd.info/wp-content/uploads/2011/03/xref-help-position.png 765w, https://www.lucd.info/wp-content/uploads/2011/03/xref-help-position-300x54.png 300w" sizes="auto, (max-width: 612px) 100vw, 612px" /></a></p>
<p>I&#8217;m probably not seeing the bigger picture and I don&#8217;t know why some decissions were taken during the development of some of the cmdlets.</p>
<p>But perhaps the Dev Team could enlighten us and produce &#8220;The making of&#8221; blog post or video  <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lucd.info/2011/03/04/powercli-cmdlet-xref-another-look/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
		<item>
		<title>My PS snapins &#038; modules</title>
		<link>https://www.lucd.info/2009/11/14/my-ps-snapins-modules/</link>
					<comments>https://www.lucd.info/2009/11/14/my-ps-snapins-modules/#comments</comments>
		
		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Sat, 14 Nov 2009 12:05:12 +0000</pubDate>
				<category><![CDATA[Module]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SnapIn]]></category>
		<guid isPermaLink="false">http://lucd.info/?p=885</guid>

					<description><![CDATA[In the My PS &#8230; series of blog entries this entry lists the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In the <strong>My PS &#8230;</strong> series of blog entries this entry lists the <strong>SnapIns</strong> and <strong>Modules</strong> I use (regularly).</p>
<p>Note that the following list is my <em>personal</em> list and that it is definitely not my aim to list <strong>all</strong> available PowerShell snapins and modules. That would be a sheer impossible task, seen the abundance of the currently available  snapins and modules.</p>
<p><a rel="attachment wp-att-914" href="https://lucd.info/2009/11/14/my-ps-snapins-modules/module/"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-914" title="module" src="https://lucd.info/wp-content/uploads/2009/11/module.jpg" alt="module" width="150" height="115" /></a></p>
<p>Previous entries in this series were <a href="https://lucd.info/2009/09/09/my-ps-toolbelt/" target="_blank" rel="noopener noreferrer">My PS toolbelt</a> and <a href="https://lucd.info/2009/09/12/my-ps-library/" target="_blank" rel="noopener noreferrer">My PS library</a>.<span id="more-885"></span>A few words of explanation on the following table.</p>
<p>In the <strong>Fmt</strong> column I tried to indicate in which format the add-on comes, as a <strong>snap</strong>in, as a <strong>mod</strong>ule or as both. The entries that have <strong>src</strong> in this column have to be dot-sourced.</p>
<p>In the <strong>PSv</strong> column you can find which PowerShell version the add-on requires.</p>
<p>The <strong>Bit</strong> column indicates, where possible, if the add-on provides a 32- and/or a 64-bit version. Some add-ons come with their own DLLs and I had to rely on the author&#8217;s information to fill in this column.</p>
<table style="width: 591px; height: 90px;" border="0">
<tbody>
<tr style="text-align: center;">
<td><strong>Name</strong></td>
<td><strong>Fmt </strong></td>
<td><strong>version</strong></td>
<td><strong>PSv</strong></td>
<td><strong>Bit</strong></td>
<td><strong>Sort description</strong></td>
</tr>
<tr>
<td><a href="https://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli?view=overview" target="_blank" rel="noopener noreferrer">PowerCLI</a></td>
<td>snap</td>
<td>4/162509</td>
<td>1,2</td>
<td>32,64</td>
<td>vSphere management</td>
</tr>
<tr>
<td><a href="https://vitoolkitextensions.codeplex.com/" target="_blank" rel="noopener noreferrer">VI Toolkit for  Windows Community Extensions</a></td>
<td>mod</td>
<td>60625</td>
<td>2</td>
<td>na</td>
<td>PowerCLI addon</td>
</tr>
<tr>
<td><a href="https://www.quest.com/powershell/activeroles-server.aspx" target="_blank" rel="noopener noreferrer">Quest ActiveRoles Management Shell</a></td>
<td>snap</td>
<td>1.2.2</td>
<td>1,2</td>
<td>32,64</td>
<td>Active Directory management</td>
</tr>
<tr>
<td><a href="https://wasp.codeplex.com/" target="_blank" rel="noopener noreferrer">WASP</a></td>
<td>both</td>
<td>1.3 RC</td>
<td>1,2</td>
<td>32</td>
<td>Windows GUI automation</td>
</tr>
<tr>
<td><a href="https://powerboots.codeplex.com/" target="_blank" rel="noopener noreferrer">PowerBoots</a></td>
<td>mod</td>
<td>GPL v0.2</td>
<td>2</td>
<td>32</td>
<td>Create graphical user interfaces</td>
</tr>
<tr>
<td><a href="https://pscx.codeplex.com/" target="_blank" rel="noopener noreferrer">PS Community Extensions (PSCX)</a></td>
<td>both</td>
<td>1.2</td>
<td>1,2</td>
<td>32</td>
<td>Set of additional cmdlets, providers, aliases, filters, &#8230;</td>
</tr>
<tr>
<td><a href="https://powershellontap.codeplex.com/" target="_blank" rel="noopener noreferrer">PowerShell OnTAP</a></td>
<td>src</td>
<td>0.1</td>
<td>1,2</td>
<td>na</td>
<td>Interact with NetApp OnTAP SDK</td>
</tr>
<tr>
<td><a href="https://www.iis.net/extensions/PowerShell" target="_blank" rel="noopener noreferrer">IIS 7.0 PS Provider</a></td>
<td>mod</td>
<td>1.0</td>
<td>2</td>
<td>32,64</td>
<td>IIS 7.0 administration</td>
</tr>
<tr>
<td><a href="https://technet.microsoft.com/en-us/library/dd378783(WS.10).aspx" target="_blank" rel="noopener noreferrer">Active Directory</a></td>
<td>mod</td>
<td>1.0</td>
<td>2</td>
<td>32,64</td>
<td>Active Directory administration</td>
</tr>
<tr>
<td><a href="https://technet.microsoft.com/en-us/library/cc974484.aspx" target="_blank" rel="noopener noreferrer">SCOM</a></td>
<td>snap</td>
<td>2007</td>
<td>1,2</td>
<td>32,64</td>
<td>Operations Manager administration</td>
</tr>
<tr>
<td><a href="https://technet.microsoft.com/en-us/library/cc281954.aspx" target="_blank" rel="noopener noreferrer">SQL</a></td>
<td>snap</td>
<td>2008</td>
<td>1,2</td>
<td>32,64</td>
<td>SQL 2008 administration</td>
</tr>
<tr>
<td><a href="https://technet.microsoft.com/en-us/library/bb123778.aspx" target="_blank" rel="noopener noreferrer">Exchange</a></td>
<td>snap</td>
<td>2007</td>
<td>1,2</td>
<td>32,64</td>
<td>Exchange 2007 administration</td>
</tr>
<tr>
<td>SharePoint 2010</td>
<td>?</td>
<td>2010</td>
<td>?</td>
<td>?</td>
<td>SharePoint 2010 administration</td>
</tr>
</tbody>
</table>
<p>I will try to update/correct this table regularly but feel free to let me know if you happen to have corrections or more recent information.</p>
<p>And you&#8217;re of course welcome to send pointers to snapins and modules not in this table that you consider useful.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lucd.info/2009/11/14/my-ps-snapins-modules/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
