<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Visual Studio Code and PowerCLI	</title>
	<atom:link href="https://www.lucd.info/2016/04/23/visual-studio-code-powercli/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Mon, 22 May 2017 15:49:29 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.9</generator>
<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>
		By: vlaneo		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-4290</link>

		<dc:creator><![CDATA[vlaneo]]></dc:creator>
		<pubDate>Mon, 22 May 2017 15:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-4290</guid>

					<description><![CDATA[Hi Luc,

I wondering if you know, where can I find the Microsoft.VSCode_profile.ps1 in a Mac or if there is another way to activate powercli in vsc for Mac ?]]></description>
			<content:encoded><![CDATA[<p>Hi Luc,</p>
<p>I wondering if you know, where can I find the Microsoft.VSCode_profile.ps1 in a Mac or if there is another way to activate powercli in vsc for Mac ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matt		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-4243</link>

		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 09 Mar 2017 19:49:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-4243</guid>

					<description><![CDATA[Do you have a way of making this function work with 6.5 R1? I haven&#039;t been able to get all the modules working correctly, most notably VMware.VimAutomation.Core]]></description>
			<content:encoded><![CDATA[<p>Do you have a way of making this function work with 6.5 R1? I haven&#8217;t been able to get all the modules working correctly, most notably VMware.VimAutomation.Core</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LazyPowerCLI		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-4236</link>

		<dc:creator><![CDATA[LazyPowerCLI]]></dc:creator>
		<pubDate>Thu, 23 Feb 2017 04:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-4236</guid>

					<description><![CDATA[function Enable-VSCodePowerCLI
{
#Load 6.5 modules
  (Get-Module VMware*).name &#124; ?{$_ -notmatch &#039;Common$&#124;SDK$&#124;Cloud$&#039;} &#124; %{Import-Module -Name $_ -Verbose:$false}
#Run initialization script
  .&#039;C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1&#039;
}

Enable-VSCodePowerCLI

$pclihelp = {
$browser = &#039;chrome.exe&#039;
$pclisites = &#039;https://communities.vmware.com/community/vmtn/automationtools/powercli/content?filterID=contentstatus[published]~objecttype~objecttype[thread]&#039;,
&#039;https://www.vmware.com/support/developer/PowerCLI/PowerCLI65R1/html/index.html&#039;,
&#039;https://pubs.vmware.com/vsphere-65/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fright-pane.html&#039;,
&#039;https://blogs.vmware.com/PowerCLI&#039;,
&#039;https://www.LazyPowerCLI.com&#039;
Start-Process $browser $pclisites
}

Register-EditorCommand  `
-SuppressOutput `
-Name &quot;PowerCLI.HelpSites&quot; `
-DisplayName &quot;PowerCLI Help Sites&quot; `
-ScriptBlock $pclihelp

$pclicmdhelp = {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$cmdlet = $context.CurrentFile.GetText($context.SelectedRange)
$browser = &#039;chrome.exe&#039;
$cmdhelp = &quot;https://www.vmware.com/support/developer/PowerCLI/PowerCLI65R1/html/$($cmdlet).html&quot;  
Start-Process $browser $cmdhelp  
}

Register-EditorCommand `
-SuppressOutput `
-Name &quot;PowerCLI.HelpCmdlet&quot; `
-DisplayName &quot;PowerCLI Cmdlet Help&quot; `
-ScriptBlock $pclicmdhelp

$pscountcmdlet = {
  param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)  
  
  $cmdArr = @()
  $varArr = @()
  foreach($token in $context.CurrentFile.Tokens){
    switch($token.GetType().Name){
      &#039;StringLiteralToken&#039;{
        if($token.TokenFlags -eq &#039;CommandName&#039;){
          $cmdArr += $token.Value
        }
      }
      &#039;VariableToken&#039;{
        $varArr += $token.Name
      }
    }
  }
  $cmdArr = $cmdArr &#124; Sort-Object -Unique
  $varArr = $varArr &#124; Sort-Object -Unique
  Write-Output &quot;You used $($cmdArr.Count) different cmdlets&quot;
  Write-Output &quot;`t$($cmdArr -join &#039;&#124;&#039;)&quot;
  Write-Output &quot;You used $($varArr.Count) different variables&quot;
  Write-Output &quot;`t$($varArr -join &#039;&#124;&#039;)&quot;
}


Register-EditorCommand `
-Name &quot;PowerShell.CountCmdletVar&quot; `
-DisplayName &quot;Count Cmdlets/Variables&quot; `
-ScriptBlock $pscountcmdlet]]></description>
			<content:encoded><![CDATA[<p>function Enable-VSCodePowerCLI<br />
{<br />
#Load 6.5 modules<br />
  (Get-Module VMware*).name | ?{$_ -notmatch &#8216;Common$|SDK$|Cloud$&#8217;} | %{Import-Module -Name $_ -Verbose:$false}<br />
#Run initialization script<br />
  .&#8217;C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1&#8242;<br />
}</p>
<p>Enable-VSCodePowerCLI</p>
<p>$pclihelp = {<br />
$browser = &#8216;chrome.exe&#8217;<br />
$pclisites = &#8216;https://communities.vmware.com/community/vmtn/automationtools/powercli/content?filterID=contentstatus[published]~objecttype~objecttype[thread]&#8217;,<br />
&#8216;https://www.vmware.com/support/developer/PowerCLI/PowerCLI65R1/html/index.html&#8217;,<br />
&#8216;https://pubs.vmware.com/vsphere-65/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fright-pane.html&#8217;,<br />
&#8216;https://blogs.vmware.com/PowerCLI&#8217;,<br />
&#8216;https://www.LazyPowerCLI.com&#8217;<br />
Start-Process $browser $pclisites<br />
}</p>
<p>Register-EditorCommand  <code><br />
-SuppressOutput </code><br />
-Name &#8220;PowerCLI.HelpSites&#8221; <code><br />
-DisplayName "PowerCLI Help Sites" </code><br />
-ScriptBlock $pclihelp</p>
<p>$pclicmdhelp = {<br />
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)<br />
$cmdlet = $context.CurrentFile.GetText($context.SelectedRange)<br />
$browser = &#8216;chrome.exe&#8217;<br />
$cmdhelp = &#8220;https://www.vmware.com/support/developer/PowerCLI/PowerCLI65R1/html/$($cmdlet).html&#8221;<br />
Start-Process $browser $cmdhelp<br />
}</p>
<p>Register-EditorCommand <code><br />
-SuppressOutput </code><br />
-Name &#8220;PowerCLI.HelpCmdlet&#8221; <code><br />
-DisplayName "PowerCLI Cmdlet Help" </code><br />
-ScriptBlock $pclicmdhelp</p>
<p>$pscountcmdlet = {<br />
  param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)  </p>
<p>  $cmdArr = @()<br />
  $varArr = @()<br />
  foreach($token in $context.CurrentFile.Tokens){<br />
    switch($token.GetType().Name){<br />
      &#8216;StringLiteralToken'{<br />
        if($token.TokenFlags -eq &#8216;CommandName&#8217;){<br />
          $cmdArr += $token.Value<br />
        }<br />
      }<br />
      &#8216;VariableToken'{<br />
        $varArr += $token.Name<br />
      }<br />
    }<br />
  }<br />
  $cmdArr = $cmdArr | Sort-Object -Unique<br />
  $varArr = $varArr | Sort-Object -Unique<br />
  Write-Output &#8220;You used $($cmdArr.Count) different cmdlets&#8221;<br />
  Write-Output &#8220;<code>t$($cmdArr -join '|')"<br />
  Write-Output "You used $($varArr.Count) different variables"<br />
  Write-Output "</code>t$($varArr -join &#8216;|&#8217;)&#8221;<br />
}</p>
<p>Register-EditorCommand <code><br />
-Name "PowerShell.CountCmdletVar" </code><br />
-DisplayName &#8220;Count Cmdlets/Variables&#8221; `<br />
-ScriptBlock $pscountcmdlet</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3895</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Sun, 15 May 2016 20:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3895</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3894&quot;&gt;Keith Hill&lt;/a&gt;.

Thanks for the info Keith.
I mentioned that as well, got me until David told me :-)

And btw, you and David are doing a hell of job here.
Looking already forward to the next release with new goodies!]]></description>
			<content:encoded><![CDATA[<p>Thanks for the info Keith.<br />
I mentioned that as well, got me until David told me 🙂</p>
<p>And btw, you and David are doing a hell of job here.<br />
Looking already forward to the next release with new goodies!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Keith Hill		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3894</link>

		<dc:creator><![CDATA[Keith Hill]]></dc:creator>
		<pubDate>Sun, 15 May 2016 20:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3894</guid>

					<description><![CDATA[&lt;a href=&quot;#comment-3890&quot; rel=&quot;nofollow&quot;&gt;@jfrmilner &lt;/a&gt; 

Just remember that for 0.6.0 you have to enable profile loading via your user preferences like so: &quot;powershell.enableProfileLoading&quot;: true   In a future release, this feature may be enabled by default but we wanted to get some stick time with it before automatically turning it on.]]></description>
			<content:encoded><![CDATA[<p><a href="#comment-3890" rel="nofollow">@jfrmilner </a> </p>
<p>Just remember that for 0.6.0 you have to enable profile loading via your user preferences like so: &#8220;powershell.enableProfileLoading&#8221;: true   In a future release, this feature may be enabled by default but we wanted to get some stick time with it before automatically turning it on.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3891</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Fri, 13 May 2016 18:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3891</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3890&quot;&gt;jfrmilner&lt;/a&gt;.

Indeed it has.
Trying to get it to work through the VSC profile.]]></description>
			<content:encoded><![CDATA[<p>Indeed it has.<br />
Trying to get it to work through the VSC profile.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jfrmilner		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3890</link>

		<dc:creator><![CDATA[jfrmilner]]></dc:creator>
		<pubDate>Fri, 13 May 2016 09:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3890</guid>

					<description><![CDATA[Support for user and system-wide profiles has now been added!  - https://github.com/PowerShell/vscode-powershell/blob/master/CHANGELOG.md#060]]></description>
			<content:encoded><![CDATA[<p>Support for user and system-wide profiles has now been added!  &#8211; <a href="https://github.com/PowerShell/vscode-powershell/blob/master/CHANGELOG.md#060" rel="nofollow ugc">https://github.com/PowerShell/vscode-powershell/blob/master/CHANGELOG.md#060</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3852</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Sun, 24 Apr 2016 10:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3852</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3851&quot;&gt;Richard Diphoorn&lt;/a&gt;.

Thanks.
There is community effort involved as well (Keith Hill, Doug Finke...). Unfortunately I&#039;m no Dev :-(
David messaged me that the next release will have profile support, then this trick isn&#039;t needed anymore :-)]]></description>
			<content:encoded><![CDATA[<p>Thanks.<br />
There is community effort involved as well (Keith Hill, Doug Finke&#8230;). Unfortunately I&#8217;m no Dev 🙁<br />
David messaged me that the next release will have profile support, then this trick isn&#8217;t needed anymore 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Richard Diphoorn		</title>
		<link>https://www.lucd.info/2016/04/23/visual-studio-code-powercli/#comment-3851</link>

		<dc:creator><![CDATA[Richard Diphoorn]]></dc:creator>
		<pubDate>Sun, 24 Apr 2016 10:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.lucd.info/?p=5149#comment-3851</guid>

					<description><![CDATA[Hi Luc! This is a great feature. Actually at PowerShell Conference Europe we got a great demonstration from David Wilson about how to extend VSCode. But he showed also demo&#039;s for Sublime Text. But remember, he&#039;s the only one who maintains and develops the code for this, so we need to give him the time.]]></description>
			<content:encoded><![CDATA[<p>Hi Luc! This is a great feature. Actually at PowerShell Conference Europe we got a great demonstration from David Wilson about how to extend VSCode. But he showed also demo&#8217;s for Sublime Text. But remember, he&#8217;s the only one who maintains and develops the code for this, so we need to give him the time.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
