<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Roman&#039;s Space</title>
	<atom:link href="http://nightroman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nightroman.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Fri, 24 May 2013 14:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nightroman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Roman&#039;s Space</title>
		<link>http://nightroman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nightroman.wordpress.com/osd.xml" title="Roman&#039;s Space" />
	<atom:link rel='hub' href='http://nightroman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Helps module &#8211; PowerShell MAML help builder</title>
		<link>http://nightroman.wordpress.com/2011/08/04/helps-module-powershell-maml-help-builder/</link>
		<comments>http://nightroman.wordpress.com/2011/08/04/helps-module-powershell-maml-help-builder/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 18:37:44 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/?p=27</guid>
		<description><![CDATA[In order to create help files for one of my PowerShell modules I did not find any better solution than to invent my own MAML help builder. Here it is: https://github.com/nightroman/Helps The module builds PowerShell MAML help files from PowerShell help scripts. Help scripts are almost WYSIWYG, they look very similar to the result help. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=27&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In order to create help files for one of my PowerShell modules I did not find any better solution than to invent my own MAML help builder. Here it is:</p>
<p><a href="https://github.com/nightroman/Helps">https://github.com/nightroman/Helps</a></p>
<p>The module builds PowerShell MAML help files from PowerShell help scripts. Help scripts are almost WYSIWYG, they look very similar to the result help. Still, they are just scripts and this makes a lot of useful features easy. One of them is building help files for several cultures.</p>
<p>The module builds help for cmdlets, functions, scripts, and providers. Here is the template help source script:</p>
<hr />
<pre>
<span style='color:#008000;'>&lt;#</span>
<span style='color:#808080;'>.SYNOPSIS</span><span style='color:#008000;'></span>
<span style='color:#008000;'>    Template help source script.</span>
<span style='color:#008000;'></span>
<span style='color:#808080;'>.DESCRIPTION</span><span style='color:#008000;'></span>
<span style='color:#008000;'>    The help source script returns hashtables describing command/provider help.</span>
<span style='color:#008000;'>    The caller or the script itself should make all the commands available.</span>
<span style='color:#008000;'></span>
<span style='color:#008000;'>    Synopsis, description, remarks, etc. can be strings or string arrays.</span>
<span style='color:#008000;'></span>
<span style='color:#008000;'>    Each string is shown as a new line. Strings with leading tabs or spaces are</span>
<span style='color:#008000;'>    treated as pre-formatted blocks. Other strings are formatted: sequences of</span>
<span style='color:#008000;'>    not empty not indented lines are joined together with single spaces.</span>
<span style='color:#008000;'>#&gt;</span>

<span style='color:#008000;'>### Command help data</span>

<span style='color:#008000;'>&lt;#</span>
<span style='color:#008000;'>* Mandatory keys: 'command', 'synopsis', 'parameters'.</span>
<span style='color:#008000;'>* 'description': the default value is the 'synopsis' text.</span>
<span style='color:#008000;'>* 'sets' keys are parameter set names, values are remarks.</span>
<span style='color:#008000;'>* 'parameters' keys are parameter names, values are remarks.</span>
<span style='color:#008000;'>* 'examples.title': the default is generated: --- EXAMPLE N ---</span>
<span style='color:#008000;'>* 'examples.code': [ScriptBlock] or [string].</span>
<span style='color:#008000;'>    [ScriptBlock] is called by 'test' called by Test-Helps.</span>
<span style='color:#008000;'>* 'examples.test': [ScriptBlock].</span>
<span style='color:#008000;'>    $args[0] is the example code being tested.</span>
<span style='color:#008000;'>#&gt;</span>
<span style='color:#0000ff;'>@{</span>
    <span style='color:#000000;'>command</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'Name'</span>
    <span style='color:#000000;'>synopsis</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>sets</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@{</span>
        <span style='color:#000000;'>Set1</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>}</span>
    <span style='color:#000000;'>parameters</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@{</span>
        <span style='color:#000000;'>Param1</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>}</span>
    <span style='color:#000000;'>inputs</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>type</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
    <span style='color:#000000;'>outputs</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>type</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
    <span style='color:#000000;'>notes</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>examples</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>title</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>introduction</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>code</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>{</span>
            <span style='color:#0000ff;'>}</span>
            <span style='color:#000000;'>remarks</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>test</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>{</span>
                . <span style='color:#ff00ff;'>$args</span><span style='color:#0000ff;'>[</span><span style='color:#800080;'>0</span><span style='color:#0000ff;'>]</span>
            <span style='color:#0000ff;'>}</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
    <span style='color:#000000;'>links</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>text</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>URI</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
<span style='color:#0000ff;'>}</span>

<span style='color:#008000;'>### Provider help data</span>

<span style='color:#008000;'>&lt;#</span>
<span style='color:#008000;'>Provider help items are similar to command help items with same names.</span>
<span style='color:#008000;'>The are a few differences:</span>
<span style='color:#008000;'>* Mandatory keys: 'provider', 'synopsis'.</span>
<span style='color:#008000;'>* 'examples': 'introduction' and 'code' are not joined.</span>
<span style='color:#008000;'>#&gt;</span>
<span style='color:#0000ff;'>@{</span>
    <span style='color:#000000;'>provider</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'Name'</span>
    <span style='color:#000000;'>drives</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>synopsis</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>capabilities</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>tasks</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>title</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>examples</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
                <span style='color:#0000ff;'>@{</span>
                    <span style='color:#000000;'>title</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
                    <span style='color:#000000;'>introduction</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
                    <span style='color:#000000;'>code</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>{</span>
                    <span style='color:#0000ff;'>}</span>
                    <span style='color:#000000;'>remarks</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
                    <span style='color:#000000;'>test</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>{</span>
                        . <span style='color:#ff00ff;'>$args</span><span style='color:#0000ff;'>[</span><span style='color:#800080;'>0</span><span style='color:#0000ff;'>]</span>
                    <span style='color:#0000ff;'>}</span>
                <span style='color:#0000ff;'>}</span>
            <span style='color:#0000ff;'>)</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
    <span style='color:#000000;'>parameters</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>name</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>type</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>cmdlets</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>values</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
                <span style='color:#0000ff;'>@{</span>
                    <span style='color:#000000;'>value</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
                    <span style='color:#000000;'>description</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
                <span style='color:#0000ff;'>}</span>
               <span style='color:#008000;'> #...</span>
            <span style='color:#0000ff;'>)</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
    <span style='color:#000000;'>notes</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
    <span style='color:#000000;'>links</span> <span style='color:#0000ff;'>=</span> <span style='color:#0000ff;'>@(</span>
        <span style='color:#0000ff;'>@{</span>
            <span style='color:#000000;'>text</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
            <span style='color:#000000;'>URI</span> <span style='color:#0000ff;'>=</span> <span style='color:#800000;'>'...'</span>
        <span style='color:#0000ff;'>}</span>
       <span style='color:#008000;'> #...</span>
    <span style='color:#0000ff;'>)</span>
<span style='color:#0000ff;'>}</span>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=27&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2011/08/04/helps-module-powershell-maml-help-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>How to run PowerShell scripts &#8220;from Explorer&#8221;</title>
		<link>http://nightroman.wordpress.com/2009/11/11/how-to-run-powershell-scripts-from-explorer/</link>
		<comments>http://nightroman.wordpress.com/2009/11/11/how-to-run-powershell-scripts-from-explorer/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 10:41:35 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2009/11/11/how-to-run-powershell-scripts-from-explorer</guid>
		<description><![CDATA[This is a popular question because after installation of PowerShell its scripts (.ps1 files) are not associated with PowerShell.exe, as one may expect. I believe there are many good security reasons for this approach. But in my case this is not suitable for many other good reasons. I want to invoke my scripts from Explorer [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=6&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!210" class="bvMsg">
<p>This is a popular question because after installation of PowerShell its scripts (.ps1 files) are not associated with PowerShell.exe, as one may expect. I believe there are many good security reasons for this approach. But in my case this is not suitable for many other good reasons. I want to invoke my scripts from Explorer by mouse double clicks, just like I invoke .bat, .cmd, .js, .vbs, .pl and other script files. </p>
<p>I tried quite a few ways of doing this and I am going to describe just one which is in active use for several years. The PowerShell script below should be invoked once to install the association (actually under the covers it calls Cmd to make the job done by FType): </p>
<hr />
<h2>Install-Association.ps1</h2>
<pre><span style="color:#008000;">&lt;#</span>
<span style="color:#808080;">.SYNOPSIS</span><span style="color:#008000;"></span>
<span style="color:#008000;">    Associates .ps1 files with PowerShell.exe</span>
<span style="color:#008000;">#&gt;</span>

<span style="color:#000000;">cmd</span> <span style="color:#0000ff;">/</span><span style="color:#000000;">c</span> <span style="color:#a31515;">@&quot;</span>
<span style="color:#a31515;">FType Microsoft.PowerShellScript.1=</span><span style="color:#ff00ff;">$PSHOME\</span><span style="color:#a31515;">powershell.exe -NoExit . &quot;'%1'&quot; %*; Exit</span>
<span style="color:#a31515;">&quot;@</span>
</pre>
<hr />
<h2>Description</h2>
<p>Basically the command tells to start PowerShell.exe and invoke a script (<tt>%1</tt>) by dot-sourcing it (operator <tt>.</tt>) with optional arguments (<tt>%*</tt>). But the command line also contains two contradicting exit related instructions: switch <tt>-NoExit</tt> for PowerShell.exe and instruction <tt>Exit</tt> for PowerShell. Why? </p>
<ul>
<li>If a script succeeds its console window is closed due to the <tt>Exit</tt> statement in the end. Of course, scripts with screen output to look at should not be invoked in this way. </li>
<li>If a script fails its console window is not closed because of <tt>-NoExit</tt> switch and not yet executed due to a failure <tt>Exit</tt> statement. </li>
</ul>
<p>After a failure one can: </p>
<ul>
<li>Read the output and error messages. </li>
<li>Investigate the variables, environment and etc. Note: a script is dot-sourced (invoked by <tt>.</tt>), that often makes more variables available in the global scope after failures. </li>
<li>Fix transient problems and re-run the script in its still opened console with a full set of original parameters simply by typing <tt>r</tt> immediately or by <tt>r 1</tt> after any command invoked. </li>
</ul>
<p><tt>&quot;'%1'&quot;</tt> would be enough for invoking scripts from Explorer. But due to <tt>%*</tt> the association also works in other scenarios with extra arguments passed in a script. For example in Cmd or Run window it is enough to provide a script path and a few simple (!) arguments, PowerShell.exe can be omitted. </p>
<hr />
<h2>Limitations</h2>
<ul>
<li>This approach does not work if a script full path contains <tt>'</tt>. But I do not really suffer from this limitation because my scripts are never in such paths. As for other scripts, I do not invoke them from Explorer, for mentioned safety reasons, too. </li>
<li><tt>%*</tt> (extra arguments) does not work (directly) with not trivial arguments with spaces and <tt>$</tt> or <tt>`</tt> symbols. For such scenarios there is yet another approach with <tt>-File</tt> parameter of PowerShell.exe. But an association command with <tt>-File</tt> does not provide described above flexibility of exit. </li>
</ul>
<hr />
<h2>Disclaimer</h2>
<p>If you use this then responsibility is all yours. Do not invoke unknown or not trivial scripts via association, results may be unwanted. But in trivial cases the described approach really helps to save seconds here and there. </p>
<hr /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=6&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2009/11/11/how-to-run-powershell-scripts-from-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>Auto-loaded Functions</title>
		<link>http://nightroman.wordpress.com/2009/10/24/auto-loaded-functions/</link>
		<comments>http://nightroman.wordpress.com/2009/10/24/auto-loaded-functions/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 18:11:40 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2009/10/24/auto-loaded-functions</guid>
		<description><![CDATA[Calling a loaded function from memory is more effective than calling a script file from disk. But it may be not a good idea to preload all the functions that can be potentially used if many of them actually may not be used in a session. The described technique of &#34;auto-loaded functions&#34; solves the dilemma: [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=8&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!209" class="bvMsg">
<p>Calling a loaded function from memory is more effective than calling a script file from disk. But it may be not a good idea to preload all the functions that can be potentially used if many of them actually may not be used in a session. The described technique of &quot;auto-loaded functions&quot; solves the dilemma: you load only what you really use and it is loaded once only on the first call.</p>
<h2>How to use</h2>
<ul>
<li>Put a script into a directory included into the system path;
<li>Call it from your code just by name, with no path or extension (e.g. just Encode-Xml in our example).</li>
</ul>
<h2>How it works</h2>
<p>On the first call of Encode-Xml (with no path or extension!) from any code the script Encode-Xml.ps1 is invoked. It takes its parameters, installs the global function Encode-Xml (exactly the same name!) and calls it with all the parameters passed into the script (@PSBoundParameters). That&#8217;s it, from now on Encode-Xml calls the installed function, not the source script (function precedence is higher).</p>
<h2>Example script with an auto-loaded function</h2>
<hr />
<pre><span style="color:#008000;">&lt;#</span>
<span style="color:#808080;">.SYNOPSIS</span><span style="color:#008000;"></span>
<span style="color:#008000;">    Encodes literal text into XML text or attribute value.</span>
<span style="color:#008000;"></span>
<span style="color:#808080;">.NOTES</span><span style="color:#008000;"></span>
<span style="color:#008000;">    Autoloaded function.</span>
<span style="color:#008000;">#&gt;</span>

<span style="color:#0000ff;">param</span>
<span style="color:#0000ff;">(</span>
    <span style="color:#008080;">[string]</span>
    <span style="color:#ff0000;">$Text</span> <span style="color:#0000ff;">=</span> <span style="color:#ff0000;">$(</span><span style="color:#0000ff;">throw</span><span style="color:#ff0000;">)</span>
<span style="color:#0000ff;">)</span>

<span style="color:#0000ff;">function</span> <span style="color:#000000;">global:Encode-Xml</span>
<span style="color:#0000ff;">(</span>
    <span style="color:#008080;">[string]</span>
    <span style="color:#ff0000;">$Text</span> <span style="color:#0000ff;">=</span> <span style="color:#ff0000;">$(</span><span style="color:#0000ff;">throw</span><span style="color:#ff0000;">)</span>
<span style="color:#0000ff;">)</span>
<span style="color:#0000ff;">&#123;</span>
    <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff00ff;">$args</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">&#123;</span> <span style="color:#0000ff;">throw</span> <span style="color:#a31515;">&quot;Invalid parameters: </span><span style="color:#ff00ff;">$args</span><span style="color:#a31515;">&quot;</span> <span style="color:#0000ff;">&#125;</span>
    <span style="color:#ff0000;">$Text</span>.<span style="color:#000000;">Replace</span><span style="color:#0000ff;">(</span><span style="color:#a31515;">'&amp;'</span>, <span style="color:#a31515;">'&amp;amp;'</span><span style="color:#0000ff;">)</span>.<span style="color:#000000;">Replace</span><span style="color:#0000ff;">(</span><span style="color:#a31515;">&quot;'&quot;</span>, <span style="color:#a31515;">'&amp;apos;'</span><span style="color:#0000ff;">)</span>.<span style="color:#000000;">Replace</span><span style="color:#0000ff;">(</span><span style="color:#a31515;">'&quot;'</span>, <span style="color:#a31515;">'&amp;quot;'</span><span style="color:#0000ff;">)</span>.<span style="color:#000000;">Replace</span><span style="color:#0000ff;">(</span><span style="color:#a31515;">'&lt;'</span>, <span style="color:#a31515;">'&amp;lt;'</span><span style="color:#0000ff;">)</span>.<span style="color:#000000;">Replace</span><span style="color:#0000ff;">(</span><span style="color:#a31515;">'&gt;'</span>, <span style="color:#a31515;">'&amp;gt;'</span><span style="color:#0000ff;">)</span>
<span style="color:#0000ff;">&#125;</span>

<span style="color:#000000;">Encode-Xml</span> <span style="color:#ff00ff;">@PSBoundParameters</span>

</pre>
<hr />
<h2>See also</h2>
<p><a href="http://huddledmasses.org/organizing-your-powershell-scripts-n-functions/" target="_blank">Organizing Your PowerShell Scripts and Functions</a> by <strong>Joel &#8216;Jaykul&#8217; Bennett</strong></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=8&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2009/10/24/auto-loaded-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>Get names of script parameters</title>
		<link>http://nightroman.wordpress.com/2008/10/16/get-names-of-script-parameters/</link>
		<comments>http://nightroman.wordpress.com/2008/10/16/get-names-of-script-parameters/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 16:52:56 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2008/10/16/get-names-of-script-parameters</guid>
		<description><![CDATA[This function parses parameters of a script and returns parameter names. For example, I use it in my own TabExpansion procedure. It requires PowerShell 2.0. function GetScriptParameter ( # Full script path. $Path, # Script code (if $Path is not defined). $Script, # Parameter wildcard pattern (to get a subset). $Pattern ) { if ($Path) { [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=13&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!187" class="bvMsg">
<hr />
<p>This function parses parameters of a script and returns parameter names. For example, I use it in my own TabExpansion procedure. It requires PowerShell 2.0.</p>
</div>
<hr />
<pre><span style="color:#0000ff;">function</span> <span style="color:#000000;">GetScriptParameter</span>
<span style="color:#0000ff;">(</span>
   <span style="color:#008000;"> # Full script path.</span>
    <span style="color:#ff0000;">$Path</span>,
   <span style="color:#008000;"> # Script code (if $Path is not defined).</span>
    <span style="color:#ff0000;">$Script</span>,
   <span style="color:#008000;"> # Parameter wildcard pattern (to get a subset).</span>
    <span style="color:#ff0000;">$Pattern</span>
<span style="color:#0000ff;">)</span>
<span style="color:#0000ff;">{</span>
    <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$Path</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
        <span style="color:#ff0000;">$Script</span> <span style="color:#0000ff;">=</span> <span style="color:#008080;">[System.IO.File]</span><span style="color:#0000ff;">::</span><span style="color:#000000;">ReadAllText</span><span style="color:#0000ff;">(</span><span style="color:#ff0000;">$Path</span><span style="color:#0000ff;">)</span>
    <span style="color:#0000ff;">}</span>

    <span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">=</span> <span style="color:#800080;">0</span>
    <span style="color:#ff0000;">$param</span> <span style="color:#0000ff;">=</span> <span style="color:#808000;">$true</span>
    <span style="color:#ff0000;">$tokens</span> <span style="color:#0000ff;">=</span> <span style="color:#0000ff;">@(</span><span style="color:#008080;">[System.Management.Automation.PSParser]</span><span style="color:#0000ff;">::</span><span style="color:#000000;">Tokenize</span><span style="color:#0000ff;">(</span><span style="color:#ff0000;">$Script</span>, <span style="color:#008080;">[ref]</span><span style="color:#808000;">$null</span><span style="color:#0000ff;">))</span>
    <span style="color:#0000ff;">for(</span><span style="color:#ff0000;">$i</span> <span style="color:#0000ff;">=</span> <span style="color:#800080;">0</span>; <span style="color:#ff0000;">$i</span> <span style="color:#0000ff;">-lt</span> <span style="color:#ff0000;">$tokens</span>.<span style="color:#000000;">Count</span>; <span style="color:#0000ff;">++</span><span style="color:#ff0000;">$i</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
        <span style="color:#ff0000;">$t</span> <span style="color:#0000ff;">=</span> <span style="color:#ff0000;">$tokens</span><span style="color:#0000ff;">[</span><span style="color:#ff0000;">$i</span><span style="color:#0000ff;">]</span>

       <span style="color:#008000;"> # skip [ whatever ]</span>
        <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">((</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Type</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'Operator'</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">-and</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'['</span><span style="color:#0000ff;">))</span> <span style="color:#0000ff;">{</span>
            <span style="color:#ff0000;">$level</span> <span style="color:#0000ff;">=</span> <span style="color:#800080;">1</span>
            <span style="color:#0000ff;">for(</span><span style="color:#0000ff;">++</span><span style="color:#ff0000;">$i</span>; <span style="color:#ff0000;">$i</span> <span style="color:#0000ff;">-lt</span> <span style="color:#ff0000;">$tokens</span>.<span style="color:#000000;">Count</span>; <span style="color:#0000ff;">++</span><span style="color:#ff0000;">$i</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                <span style="color:#ff0000;">$t</span> <span style="color:#0000ff;">=</span> <span style="color:#ff0000;">$tokens</span><span style="color:#0000ff;">[</span><span style="color:#ff0000;">$i</span><span style="color:#0000ff;">]</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Type</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'Operator'</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'['</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                        <span style="color:#0000ff;">++</span><span style="color:#ff0000;">$level</span>
                    <span style="color:#0000ff;">}</span>
                    <span style="color:#0000ff;">elseif(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">']'</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                        <span style="color:#0000ff;">--</span><span style="color:#ff0000;">$level</span>
                        <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$level</span> <span style="color:#0000ff;">-le</span> <span style="color:#800080;">0</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                            <span style="color:#0000ff;">break</span>
                        <span style="color:#0000ff;">}</span>
                    <span style="color:#0000ff;">}</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">continue</span>
        <span style="color:#0000ff;">}</span>

        <span style="color:#0000ff;">switch(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Type</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
            <span style="color:#800000;">'NewLine'</span> <span style="color:#0000ff;">{</span> <span style="color:#0000ff;">break</span> <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'Comment'</span> <span style="color:#0000ff;">{</span> <span style="color:#0000ff;">break</span> <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'Command'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">-le</span> <span style="color:#800080;">1</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">return</span>
                <span style="color:#0000ff;">}</span>
                <span style="color:#0000ff;">break</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'Keyword'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800080;">0</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'param'</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                        <span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">=</span> <span style="color:#800080;">1</span>
                        <span style="color:#0000ff;">break</span>
                    <span style="color:#0000ff;">}</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'GroupStart'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$mode</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">++</span><span style="color:#ff0000;">$mode</span>
                    <span style="color:#0000ff;">break</span>
                <span style="color:#0000ff;">}</span>
                <span style="color:#0000ff;">else</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">return</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'GroupEnd'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">--</span><span style="color:#ff0000;">$mode</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">-lt</span> <span style="color:#800080;">2</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#0000ff;">return</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'Variable'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800080;">2</span> <span style="color:#0000ff;">-and</span> <span style="color:#ff0000;">$param</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#ff0000;">$param</span> <span style="color:#0000ff;">=</span> <span style="color:#808000;">$false</span>
                    <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">((</span>!<span style="color:#ff0000;">$Pattern</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">-or</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-like</span> <span style="color:#ff0000;">$Pattern</span><span style="color:#0000ff;">))</span> <span style="color:#0000ff;">{</span>
                        <span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span>
                    <span style="color:#0000ff;">}</span>
                    <span style="color:#0000ff;">break</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
            <span style="color:#800000;">'Operator'</span> <span style="color:#0000ff;">{</span>
                <span style="color:#0000ff;">if</span> <span style="color:#0000ff;">((</span><span style="color:#ff0000;">$mode</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800080;">2</span><span style="color:#0000ff;">)</span> <span style="color:#0000ff;">-and</span> <span style="color:#0000ff;">(</span><span style="color:#ff0000;">$t</span>.<span style="color:#000000;">Content</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">','</span><span style="color:#0000ff;">))</span> <span style="color:#0000ff;">{</span>
                    <span style="color:#ff0000;">$param</span> <span style="color:#0000ff;">=</span> <span style="color:#808000;">$true</span>
                <span style="color:#0000ff;">}</span>
            <span style="color:#0000ff;">}</span>
        <span style="color:#0000ff;">}</span>
    <span style="color:#0000ff;">}</span>
<span style="color:#0000ff;">}</span></pre>
<hr />
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=13&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2008/10/16/get-names-of-script-parameters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>V2: Debugger for Graphical PowerShell V2 CTP2</title>
		<link>http://nightroman.wordpress.com/2008/05/07/v2-debugger-for-graphical-powershell-v2-ctp2/</link>
		<comments>http://nightroman.wordpress.com/2008/05/07/v2-debugger-for-graphical-powershell-v2-ctp2/#comments</comments>
		<pubDate>Wed, 07 May 2008 10:04:44 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2008/05/07/v2-debugger-for-graphical-powershell-v2-ctp2</guid>
		<description><![CDATA[V1 is here&#8230;   What&#8217;s new in V2 ProcessDebuggerStop is called dot-sourced, so that debug expressions are invoked in the current scope and normally you can change local variables directly; Local variables of ProcessDebuggerStop moved to $global:__DebuggerStop members (to avoid clashes with real variables and debug expressions); 10 ($__DebuggerStop.MaximumHistoryCount) last debug expressions are kept in [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=12&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!170" class="bvMsg">
<p><a href="http://nightroman.spaces.live.com/blog/cns!F011223B604739FA!169.entry">V1 is here&#8230;</a> </p>
<p>  </p>
<div><strong>What&#8217;s new in V2</strong></div>
<ul>
<li><em>ProcessDebuggerStop</em> is called dot-sourced, so that debug expressions are invoked in the current scope and normally you can change local variables directly;
<li>Local variables of <em>ProcessDebuggerStop</em> moved to <em>$global:__DebuggerStop</em> members (to avoid clashes with real variables and debug expressions);
<li>10 (<em>$__DebuggerStop.MaximumHistoryCount</em>) last debug expressions are kept in history and shown in the dialog, you can copy and paste them;
<li><em>&lt;enter&gt;</em> repeats the last step or step-over command (similar to <em>ConsoleHost</em>).
<li>Added two new debug commands (Keith Hill&#8217;s idea and the code):
<ul>
<li><em>&lt;number&gt;</em>: show debug location in context of <em>&lt;number&gt;</em> lines;
<li><em>+ &lt;number&gt;</em>: set location context preference to <em>&lt;number&gt;</em> lines (<em>$__DebuggerStop.ShowDebugLocation</em>). Default is 0, so that only position messages are shown; if it is positive then debug location is shown in context of <em>&lt;number&gt;</em> of lines.</ul>
</ul>
<p><strong>Download:</strong> <a href="http://farnet.googlecode.com/files/Utility_GPowerShellDebugger2.zip">Utility_GPowerShellDebugger2.zip</a>  </div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=12&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2008/05/07/v2-debugger-for-graphical-powershell-v2-ctp2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugger for Graphical PowerShell V2 CTP2</title>
		<link>http://nightroman.wordpress.com/2008/05/05/debugger-for-graphical-powershell-v2-ctp2/</link>
		<comments>http://nightroman.wordpress.com/2008/05/05/debugger-for-graphical-powershell-v2-ctp2/#comments</comments>
		<pubDate>Mon, 05 May 2008 12:24:49 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2008/05/05/debugger-for-graphical-powershell-v2-ctp2</guid>
		<description><![CDATA[Graphical PowerShell V2 CTP2 still looks like a demo, basically speaking. Nevertheless, I find it already suitable for some tasks. Unfortunately it does not implement a few host features including default breakpoint debugger action. Breakpoints without action are simply ignored. Fortunately PowerShell provides a way to solve this. Here it is: simple and yet practically [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=14&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!169" class="bvMsg">
<p>Graphical PowerShell V2 CTP2 still looks like a demo, basically speaking. Nevertheless, I find it already suitable for some tasks. Unfortunately it does not implement a few host features including default breakpoint debugger action. Breakpoints without action are simply ignored. Fortunately PowerShell provides a way to solve this. Here it is: simple and yet practically useful <em>Add-Debugger.ps1</em>. The archive also contains <em>Test-Debugger.ps1</em> to play with and see how debugging goes (in any host, actually). Follow instructions in the script headers.<br /> 
<p><strong>Download:</strong> <a href="http://farnet.googlecode.com/files/Utility_GPowerShellDebugger.zip">Utility_GPowerShellDebugger.zip</a> (EDIT: the next version is <a href="http://nightroman.spaces.live.com/blog/cns!F011223B604739FA!170.entry">here&#8230;</a>)</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=14&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2008/05/05/debugger-for-graphical-powershell-v2-ctp2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell.hrc for Colorer, version 1.3.4</title>
		<link>http://nightroman.wordpress.com/2007/10/11/powershell-hrc-for-colorer-version-1-3-4/</link>
		<comments>http://nightroman.wordpress.com/2007/10/11/powershell-hrc-for-colorer-version-1-3-4/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 14:52:12 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2007/10/11/powershell-hrc-for-colorer-version-1-3-4</guid>
		<description><![CDATA[PowerShell.hrc for Colorer, version 1.3.4   EDIT: This version is obsolete. The latest PowerShell.hrc is included into the featured version of PowerShellFar plug-in for Far Manager: http://code.google.com/p/farnet/   What&#8217;s new: REGEX and SQL schemes are supported in PowerShell literal strings. Flexibility and power of COLORER is amazing &#8211; it not only supports tons of file [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=4&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!155" class="bvMsg">
<div>
<hr />
</div>
<h1>PowerShell.hrc for Colorer, version 1.3.4 </h1>
<p><span style="font-size:11pt;line-height:115%;font-family:Calibri,sans-serif;"><font color="#000000"></font></span> </p>
<p><span style="font-size:11pt;line-height:115%;font-family:Calibri,sans-serif;"><font color="#000000">EDIT: This version is obsolete. The latest PowerShell.hrc is included into the featured version of PowerShellFar plug-in for Far Manager: </font><a href="http://code.google.com/p/farnet/"><u><font color="#800080">http://code.google.com/p/farnet/</font></u></a></span></p>
<div> </div>
<p>What&#8217;s new: REGEX and SQL schemes are supported in PowerShell literal strings. </p>
<p>Flexibility and power of COLORER is amazing &#8211; it not only supports tons of file formats, but also allows combining schemes together (e.g. HTML scheme supports embedded JScript, VBScript and etc. reusing their schemes). As for the PowerShell, in new version of <i>PowerShell.hrc</i> I tried to use REGEX and SQL schemes in literal strings. </p>
<ul>
<li>REGEX scheme is used in string operand of -match, -notmatch, -replace and etc.
<li>Here strings are processed with REGEX or SQL schemes starting with lines <code>#REGEX</code> or <code>--SQL</code> respectively. Note that regex normally should be created with option <code>IgnorePatternWhitespace</code> or it should use inline instruction <code>(?x)</code>. </li>
</li>
</ul>
<div>
<hr />
</div>
<h2>Examples of highlighting in PowerShell strings</h2>
<pre><span style="color:#008080;">### Regex in operands</span>

<span style="color:#800000;">&quot;ab11* 'foo'&quot;</span> <span style="color:#0000ff;">-notmatch</span> <span style="color:#800000;">'</span><span style="color:#000080;">^</span><span style="color:#800000;">ab</span><span style="color:#000080;">[</span><span style="color:#800000;">0</span><span style="color:#000080;">-</span><span style="color:#800000;">2</span><span style="color:#000080;">]</span><span style="color:#000080;">(</span><span style="color:#ff0000;">d</span><span style="color:#000080;">+</span><span style="color:#000080;">)</span><span style="color:#ff00ff;">*</span><span style="color:#ff0000;">s</span><span style="color:#000080;">+</span><span style="color:#ff00ff;">''</span><span style="color:#000080;">(</span><span style="color:#ff0000;">w</span><span style="color:#000080;">+</span><span style="color:#000080;">)</span><span style="color:#ff00ff;">\</span><span style="color:#ff00ff;">''</span><span style="color:#800000;">'</span>
<span style="color:#800000;">'ab11* &quot;foo&quot;'</span> <span style="color:#0000ff;">-match</span> <span style="color:#800000;">&quot;</span><span style="color:#000080;">^</span><span style="color:#800000;">ab</span><span style="color:#000080;">[</span><span style="color:#800000;">0</span><span style="color:#000080;">-</span><span style="color:#800000;">2</span><span style="color:#000080;">]</span><span style="color:#ff0000;">$(</span><span style="color:#008000;">2</span><span style="color:#800000;"> </span><span style="color:#0000ff;">-</span><span style="color:#800000;"> </span><span style="color:#008000;">1</span><span style="color:#ff0000;">)</span><span style="color:#ff00ff;">*</span><span style="color:#ff0000;">s</span><span style="color:#000080;">+</span><span style="color:#ff0000;">$(</span><span style="color:#0000ff;">$null</span><span style="color:#ff0000;">)</span><span style="color:#ff0000;">$null</span><span style="color:#ff00ff;">`&quot;</span><span style="color:#800000;">foo</span><span style="color:#ff00ff;">\</span><span style="color:#ff00ff;">`&quot;</span><span style="color:#800000;">&quot;</span>
<span style="color:#800000;">'2007-9-23'</span> <span style="color:#0000ff;">-replace</span> <span style="color:#800000;">'</span><span style="color:#0000ff;">b</span><span style="color:#000080;">(</span><span style="color:#ff0000;">d</span><span style="color:#000080;">&#123;</span><span style="color:#008000;">2,4</span><span style="color:#000080;">&#125;</span><span style="color:#000080;">)</span><span style="color:#800000;">-</span><span style="color:#000080;">(</span><span style="color:#000080;">[</span><span style="color:#800000;">01</span><span style="color:#000080;">]</span><span style="color:#000080;">?</span><span style="color:#ff0000;">d</span><span style="color:#000080;">)</span><span style="color:#800000;">-</span><span style="color:#000080;">(</span><span style="color:#000080;">[</span><span style="color:#800000;">012</span><span style="color:#000080;">]</span><span style="color:#000080;">?</span><span style="color:#ff0000;">d</span><span style="color:#000080;">)</span><span style="color:#0000ff;">b</span><span style="color:#800000;">'</span>, <span style="color:#800000;">'$3/$2/$1'</span>

<span style="color:#008080;">### Regex in here strings</span>

<span style="color:#ff0000;">$re</span> <span style="color:#0000ff;">=</span> <span style="color:#800000;">@'</span>
<span style="color:#008080;">#REGEX Id and Name</span><span style="color:#800000;"></span>
<span style="color:#ff00ff;">#</span><span style="color:#000080;">(</span><span style="color:#000080;">?</span><span style="color:#800000;">&lt;Id&gt;</span><span style="color:#ff0000;">d</span><span style="color:#000080;">+</span><span style="color:#000080;">)</span><span style="color:#008080;">           # #number</span><span style="color:#800000;"></span>
<span style="color:#ff0000;">s</span><span style="color:#000080;">+</span><span style="color:#008080;">                    # spaces</span><span style="color:#800000;"></span>
<span style="color:#000080;">(</span><span style="color:#000080;">?</span><span style="color:#800000;">&lt;Name&gt;</span><span style="color:#000080;">[</span><span style="color:#800000;">_a</span><span style="color:#000080;">-</span><span style="color:#800000;">zA</span><span style="color:#000080;">-</span><span style="color:#800000;">Z</span><span style="color:#000080;">]</span><span style="color:#ff0000;">w</span><span style="color:#000080;">*</span><span style="color:#000080;">)</span><span style="color:#008080;">  # name</span><span style="color:#800000;"></span>
<span style="color:#800000;">'@</span>

<span style="color:#008080;"># how to use such a pattern:</span>
<span style="color:#0000ff;">New-Object</span> <span style="color:#000000;">Regex</span> <span style="color:#ff0000;">$re</span>, <span style="color:#800000;">'IgnorePatternWhitespace'</span>

<span style="color:#008080;">### SQL in here strings</span>

<span style="color:#800000;">@'</span>
<span style="color:#008080;">--SQL single quoted</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">SELECT</span><span style="color:#800000;"> </span><span style="color:#000000;">Data1</span><span style="color:#000080;">,</span><span style="color:#800000;"> </span><span style="background:#ffff00;color:#0000ff;">COUNT</span><span style="color:#000080;">(</span><span style="color:#008000;">1</span><span style="color:#000080;">)</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">FROM</span><span style="color:#800000;"> </span><span style="color:#000000;">Table1</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">WHERE</span><span style="color:#800000;"> </span><span style="color:#000000;">Data1</span><span style="color:#800000;"> </span><span style="color:#000080;">=</span><span style="color:#800000;"> </span><span style="color:#800000;">'$literal'</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">GROUP</span><span style="color:#800000;"> </span><span style="color:#0000ff;">BY</span><span style="color:#800000;"> </span><span style="color:#000000;">Data1</span><span style="color:#800000;"></span>
<span style="color:#800000;">'@</span>

<span style="color:#800000;">@&quot;</span>
<span style="color:#008080;">--SQL double quoted</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">SELECT</span><span style="color:#800000;"> </span><span style="color:#000000;">Data1</span><span style="color:#000080;">,</span><span style="color:#800000;"> </span><span style="background:#ffff00;color:#0000ff;">COUNT</span><span style="color:#000080;">(</span><span style="color:#008000;">1</span><span style="color:#000080;">)</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">FROM</span><span style="color:#800000;"> </span><span style="color:#ff0000;">$Table</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">WHERE</span><span style="color:#800000;"> </span><span style="color:#ff0000;">$x</span><span style="color:#800000;"> </span><span style="color:#000080;">=</span><span style="color:#800000;"> </span><span style="color:#800000;">'</span><span style="color:#ff0000;">$variable</span><span style="color:#800000;">'</span><span style="color:#800000;"></span>
<span style="color:#0000ff;">GROUP</span><span style="color:#800000;"> </span><span style="color:#0000ff;">BY</span><span style="color:#800000;"> </span><span style="color:#000000;">Data1</span><span style="color:#800000;"></span>
<span style="color:#800000;">&quot;@</span>

</pre>
<div>
<hr />
</div>
</p>
</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=4&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2007/10/11/powershell-hrc-for-colorer-version-1-3-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>Example of a PowerShell script converted to HTML with syntax highlighting</title>
		<link>http://nightroman.wordpress.com/2007/03/16/example-of-a-powershell-script-converted-to-html-with-syntax-highlighting/</link>
		<comments>http://nightroman.wordpress.com/2007/03/16/example-of-a-powershell-script-converted-to-html-with-syntax-highlighting/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 00:19:25 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2007/03/16/example-of-a-powershell-script-converted-to-html-with-syntax-highlighting</guid>
		<description><![CDATA[This is not a real script, it is a script used for testing of syntax description PowerShell.hrc for Colorer and covering related issues. Perhaps this HTML looks like a Christmas Tree, no problem, it is just a demo. One can configure Colorer according to his preferences. Take a look at how it handles and distinguishes [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=7&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!137" class="bvMsg">
<hr />
<p>This is not a real script, it is a script used for testing of syntax description <a href="http://nightroman.spaces.live.com/blog/cns!F011223B604739FA!130.entry">PowerShell.hrc </a>for <a href="http://colorer.sf.net/">Colorer</a> and covering related issues. Perhaps this HTML looks like a Christmas Tree, no problem, it is just a demo. One can configure Colorer according to his preferences. Take a look at how it handles and distinguishes expandable and not expandable string content and escaping rules, is not it a beauty?</div>
<hr />
<h4><a href="http://farnet.googlecode.com/files/demo-colorer.htm" target="_blank">Demo: highlighted PowerShell</a></h4>
<p>EDIT: replaced large demo text with a link</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=7&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2007/03/16/example-of-a-powershell-script-converted-to-html-with-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>Get-Drive.ps1 and Get-File.ps1 &#8211; Get all local files</title>
		<link>http://nightroman.wordpress.com/2006/12/14/get-drive-ps1-and-get-file-ps1-get-all-local-files/</link>
		<comments>http://nightroman.wordpress.com/2006/12/14/get-drive-ps1-and-get-file-ps1-get-all-local-files/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 14:18:15 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2006/12/14/get-drive-ps1-and-get-file-ps1-get-all-local-files</guid>
		<description><![CDATA[Synopsis The task of iterating through all local files may be not straightforward if there are several drives including removable, network or substituted drives and NTFS reparse points directories. Get-Drive.ps1 and Get-File.ps1 used together may help: Get-Drive.ps1 returns only local physical drives, Get-File.ps1 excludes reparse points. Examples # calculate total available free space in GB [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=11&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!131" class="bvMsg">
<div>
<hr />
<h4>Synopsis </h4>
<p>The task of iterating through all local files may be not straightforward if there are several drives including removable, network or substituted drives and NTFS reparse points directories. Get-Drive.ps1 and Get-File.ps1 used together may help: Get-Drive.ps1 returns only local physical drives, Get-File.ps1 excludes reparse points. </p>
<hr />
<h4>Examples </h4>
<pre><span style="color:#008080;"># calculate total available free space in GB</span>
<span style="color:#000080;">(</span><span style="color:#000000;">Get-Drive</span> <span style="background:#ffff00;color:#0000ff;">|</span> <span style="color:#0000ff;">Measure-Object</span> <span style="color:#000000;">AvailableFreeSpace</span> -<span style="color:#000000;">Sum</span><span style="color:#000080;">)</span>.<span style="color:#000000;">Sum</span><span style="color:#0000ff;">/</span><span style="color:#008000;">1</span><span style="color:#0000ff;">GB</span>

<span style="color:#008080;"># get paths of all local .bak files</span>
<span style="color:#000000;">Get-File</span> \ <span style="color:#0000ff;">*</span>.<span style="color:#000000;">bak</span> -<span style="color:#000000;">Name</span>
<hr /></pre>
<h4>Get-Drive.ps1 </h4>
<pre><span style="color:#800080;">##</span>
<span style="color:#800080;">## Author   : Roman Kuzmin</span>
<span style="color:#800080;">## Synopsis : Get physical drives</span>
<span style="color:#800080;">##</span>
<span style="color:#800080;">## Returns System.IO.DriveInfo objects</span>
<span style="color:#800080;">##</span>
<span style="color:#800080;">## *) removable, network and subst drives are excluded.</span>
<span style="color:#800080;">##</span>

<span style="color:#ff0000;">$subst</span> <span style="color:#0000ff;">=</span> <span style="color:#808080;">[string]</span><span style="color:#000080;">(</span><span style="color:#000000;">subst</span><span style="color:#000080;">)</span>
<span style="color:#0000ff;">foreach</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$d</span> <span style="color:#0000ff;">in</span> <span style="color:#808080;">[System.IO.DriveInfo]</span>::<span style="color:#000000;">GetDrives</span><span style="color:#000080;">(</span><span style="color:#000080;">)</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
    <span style="color:#0000ff;">if</span> <span style="color:#000080;">(</span><span style="color:#ff0000;">$d</span>.<span style="color:#000000;">DriveType</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'Fixed'</span> <span style="color:#0000ff;">-and</span> <span style="color:#ff0000;">$subst</span> <span style="color:#0000ff;">-notlike</span> <span style="color:#800000;">&quot;*</span><span style="color:#ff0000;">$(</span><span style="color:#ff0000;">$d</span><span style="color:#800000;">.</span><span style="color:#000000;">Name</span><span style="color:#ff0000;">)</span><span style="color:#800000;">:*&quot;</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#ff0000;">$d</span>
    <span style="color:#808000;">&#125;</span>
<span style="color:#808000;">&#125;</span>
</pre>
<hr />
<h4>Get-File.ps1 </h4>
<pre><span style="color:#800080;">##</span>
<span style="color:#800080;">## Author   : Roman Kuzmin</span>
<span style="color:#800080;">## Synopsis : Get all files</span>
<span style="color:#800080;">##</span>
<span style="color:#800080;">## Returns System.IO.FileInfo objects or full names.</span>
<span style="color:#800080;">## -Root: root directory(s); single \ or // denotes all physical drives.</span>
<span style="color:#800080;">## -Filter: simple file system filter.</span>
<span style="color:#800080;">## -Name: return full names as strings.</span>
<span style="color:#800080;">##</span>
<span style="color:#800080;">## *) requires Get-Drive.ps1.</span>
<span style="color:#800080;">## *) access errors are silently ignored.</span>
<span style="color:#800080;">## *) hidden and system files are included.</span>
<span style="color:#800080;">## *) reparse points directories are excluded.</span>
<span style="color:#800080;">##</span>

<span style="color:#0000ff;">param</span>
<span style="color:#000080;">(</span>
    <span style="color:#808080;">[string[]]</span><span style="color:#ff0000;">$Root</span> <span style="color:#0000ff;">=</span> <span style="color:#800000;">'.'</span><span style="color:#0000ff;">,</span>
    <span style="color:#808080;">[string]</span><span style="color:#ff0000;">$Filter</span> <span style="color:#0000ff;">=</span> <span style="color:#800000;">'*'</span><span style="color:#0000ff;">,</span>
    <span style="color:#808080;">[switch]</span><span style="color:#ff0000;">$Name</span>
<span style="color:#000080;">)</span>

<span style="color:#0000ff;">function</span> <span style="color:#000000;">DirectoryFiles</span><span style="color:#000080;">(</span><span style="color:#808080;">[System.IO.DirectoryInfo]</span><span style="color:#ff0000;">$di</span><span style="color:#000080;">)</span>
<span style="color:#808000;">&#123;</span>
   <span style="color:#008080;"> # ignore errors</span>
    <span style="color:#0000ff;">trap</span> <span style="color:#808000;">&#123;</span><span style="color:#0000ff;">continue</span><span style="color:#808000;">&#125;</span>

   <span style="color:#008080;"> # skip a reparse point</span>
    <span style="color:#0000ff;">if</span> <span style="color:#000080;">(</span><span style="color:#ff0000;">$di</span>.<span style="color:#000000;">Attributes</span> <span style="color:#0000ff;">-band</span> <span style="color:#808080;">[System.IO.FileAttributes]</span>::<span style="color:#000000;">ReparsePoint</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#0000ff;">return</span>
    <span style="color:#808000;">&#125;</span>

   <span style="color:#008080;"> # files</span>
    <span style="color:#0000ff;">if</span> <span style="color:#000080;">(</span><span style="color:#ff0000;">$Name</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#0000ff;">foreach</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$f</span> <span style="color:#0000ff;">in</span> <span style="color:#ff0000;">$di</span>.<span style="color:#000000;">GetFiles</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$Filter</span><span style="color:#000080;">)</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
            <span style="color:#ff0000;">$f</span>.<span style="color:#000000;">FullName</span>
        <span style="color:#808000;">&#125;</span>
    <span style="color:#808000;">&#125;</span> <span style="color:#0000ff;">else</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#ff0000;">$di</span>.<span style="color:#000000;">GetFiles</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$Filter</span><span style="color:#000080;">)</span>
    <span style="color:#808000;">&#125;</span>

   <span style="color:#008080;"> # directories</span>
    <span style="color:#0000ff;">foreach</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$d</span> <span style="color:#0000ff;">in</span> <span style="color:#ff0000;">$di</span>.<span style="color:#000000;">GetDirectories</span><span style="color:#000080;">(</span><span style="color:#000080;">)</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#000000;">DirectoryFiles</span> <span style="color:#ff0000;">$d</span>
    <span style="color:#808000;">&#125;</span>
<span style="color:#808000;">&#125;</span>

<span style="color:#0000ff;">if</span> <span style="color:#000080;">(</span><span style="color:#ff0000;">$Root</span>.<span style="color:#000000;">Count</span> <span style="color:#0000ff;">-eq</span> <span style="color:#008000;">1</span> <span style="color:#0000ff;">-and</span> <span style="color:#000080;">(</span><span style="color:#ff0000;">$Root</span><span style="color:#000080;">[</span><span style="color:#008000;">0</span><span style="color:#000080;">]</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'\'</span> <span style="color:#0000ff;">-or</span> <span style="color:#ff0000;">$Root</span><span style="color:#000080;">[</span><span style="color:#008000;">0</span><span style="color:#000080;">]</span> <span style="color:#0000ff;">-eq</span> <span style="color:#800000;">'//'</span><span style="color:#000080;">)</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
    <span style="color:#0000ff;">foreach</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$d</span> <span style="color:#0000ff;">in</span> <span style="color:#000000;">Get-Drive</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#000000;">DirectoryFiles</span> <span style="color:#ff0000;">$d</span>.<span style="color:#000000;">RootDirectory</span>
    <span style="color:#808000;">&#125;</span>
<span style="color:#808000;">&#125;</span> <span style="color:#0000ff;">else</span> <span style="color:#808000;">&#123;</span>
    <span style="color:#0000ff;">foreach</span><span style="color:#000080;">(</span><span style="color:#ff0000;">$d</span> <span style="color:#0000ff;">in</span> <span style="color:#ff0000;">$Root</span><span style="color:#000080;">)</span> <span style="color:#808000;">&#123;</span>
        <span style="color:#000000;">DirectoryFiles</span> <span style="color:#ff0000;">$d</span>
    <span style="color:#808000;">&#125;</span>
<span style="color:#808000;">&#125;</span>
</pre>
<hr />
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=11&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2006/12/14/get-drive-ps1-and-get-file-ps1-get-all-local-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell syntax description for Colorer and Far Manager editor</title>
		<link>http://nightroman.wordpress.com/2006/12/07/powershell-syntax-description-for-colorer-and-far-manager-editor/</link>
		<comments>http://nightroman.wordpress.com/2006/12/07/powershell-syntax-description-for-colorer-and-far-manager-editor/#comments</comments>
		<pubDate>Thu, 07 Dec 2006 23:27:46 +0000</pubDate>
		<dc:creator>Roman Kuzmin</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nightroman.wordpress.com/2006/12/07/powershell-syntax-description-for-colorer-and-far-manager-editor</guid>
		<description><![CDATA[Synopsis PowerShell.hrc defines PowerShell syntax description for Colorer and Far Manager editor with FarColorer plugin. EDIT: This version is obsolete. The latest PowerShell.hrc is included into the featured version of PowerShellFar plug-in for Far Manager: http://code.google.com/p/farnet/ PowerShell.hrc &#60;?xml version=&#34;1.0&#34; encoding=&#34;windows-1251&#34;?&#62; &#60;!DOCTYPE hrc PUBLIC &#34;-//Cail Lomecb//DTD Colorer HRC take5//EN&#34; &#34;http://colorer.sf.net/2003/hrc.dtd&#34;&#62; &#60;hrc version=&#34;take5&#34; xmlns=&#34;http://colorer.sf.net/2003/hrc&#34; xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34; xsi:schemaLocation=&#34;http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd&#34;&#62; &#60;!-- [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=5&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="msgcns!F011223B604739FA!130" class="bvMsg">
<div>
<hr />
<h4>Synopsis</h4>
<p>PowerShell.hrc defines PowerShell syntax description for <a href="http://colorer.sourceforge.net/">Colorer</a> and <a href="http://www.farmanager.com/">Far Manager</a> editor with <a href="http://colorer.sf.net/">FarColorer</a> plugin. </p>
<p><font face="Times New Roman" color="#000000" size="3">EDIT: This version is obsolete. The latest PowerShell.hrc is included into the featured version of PowerShellFar plug-in for Far Manager: </font><a href="http://code.google.com/p/farnet/"><u><font face="Times New Roman" color="#800080" size="3">http://code.google.com/p/farnet/</font></u></a></p>
<hr />
<h4>PowerShell.hrc </h4>
<pre><font size="2">&lt;?</font><b>xml</b><font size="2"> version</font><i>=</i><b>&quot;</b><b>1.0</b><b>&quot;</b><font size="2"> encoding</font><i>=</i><b>&quot;</b><b>windows-1251</b><b>&quot;</b><font size="2">?&gt;</font>
<font size="2">&lt;!DOCTYPE</font> <font size="2">hrc</font> <b>PUBLIC</b> <b>&quot;-//</b><font size="2">Cail Lomecb</font><b>//DTD Colorer HRC take5//EN&quot;</b> <b>&quot;http://colorer.sf.net/2003/hrc.dtd&quot;</b><font size="2">&gt;</font>
<b>&lt;</b><b>hrc</b> version<i>=</i><b>&quot;</b><b>take5</b><b>&quot;</b> xmlns<i>=</i><b>&quot;</b><b>http</b><i>:</i><b>//</b><u>colorer.sf.net</u><u>/2003/hrc</u><b>&quot;</b> xmlns<i>:</i>xsi<i>=</i><b>&quot;</b><b>http</b><i>:</i><b>//</b><u>www.w3.org</u><u>/2001/XMLSchema-instance</u><b>&quot;</b> xsi<i>:</i>schemaLocation<i>=</i><b>&quot;</b><b>http</b><i>:</i><b>//</b><u>colorer.sf.net</u><u>/2003/hrc</u><b> </b><b>http</b><i>:</i><b>//</b><u>colorer.sf.net</u><u>/2003/hrc.xsd</u><b>&quot;</b><b>&gt;</b>

<i>&lt;!--</i><i></i>
<i>Insert into catalog.xml a link to this:</i>
<i>&lt;location link=&quot;&lt;path&gt;/PowerShell.hrc&quot;/&gt;</i>
<i>--&gt;</i>

<b>&lt;</b><b>prototype</b> name<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b> group<i>=</i><b>&quot;</b><b>scripts</b><b>&quot;</b> description<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>filename</b><b>&gt;</b><b>/</b><i>(</i><i>.</i>ps1<i>$</i><i>|</i><i>.</i>ps1<i>.</i>bak<i>$</i><i>|</i><i>.</i>psfconsole<i>$</i><i>)</i><b>/</b><b>i</b><b>&lt;/</b><b>filename</b><b>&gt;</b>
<b>&lt;/</b><b>prototype</b><b>&gt;</b>

<b>&lt;</b><b>type</b> name<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b><b>&gt;</b>

<b>&lt;</b><b>annotation</b><b>&gt;</b>
<b>&lt;</b><b>documentation</b><b>&gt;</b>
PowerShell.hrc version 1.3.1, 2007.03.21
PowerShell syntax description and .psfconsole features.
Created and tested for PowerShell 1.0 with Colorer-take5.beta5
<b>&lt;/</b><b>documentation</b><b>&gt;</b>
<b>&lt;</b><b>contributors</b><b>&gt;</b>
Roman Kuzmin, nightroman@hotmail.com
<b>&lt;/</b><b>contributors</b><b>&gt;</b>
<b>&lt;/</b><b>annotation</b><b>&gt;</b>

<b>&lt;</b><b>import</b> type<i>=</i><b>&quot;</b><b>def</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Escaped </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSEscaped</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>`</b><b>s</b><i>+</i><i>$</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Error</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>`</b><i>.</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>StringContent</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Variable </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSVariable</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>$</i><i>[</i><b>w</b><b>:</b><i>]</i><i>*</i><b>w</b><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>$</i><i>&#123;</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>&#125;</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSEscaped</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b> region01<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b> region11<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Expanded </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSExpanded</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>$</i><i>(</i><i>)</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>)</i><i>)</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b> region01<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b> region11<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Var</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Array </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSArray</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>@</i><i>(</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>)</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Hash </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSHash</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>@</i><i>&#123;</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>&#125;</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Number </i><i>--&gt;</i>
<b>&lt;</b><b>entity</b> name<i>=</i><b>&quot;</b><b>psnumexp</b><b>&quot;</b> value<i>=</i><b>&quot;</b><i>(</i><i>?</i><b>:</b><i>[</i><b>eE</b><i>]</i><i>[</i><i>-</i><b>+</b><i>]</i><i>?</i><b>d</b><i>+</i><i>)</i><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>entity</b> name<i>=</i><b>&quot;</b><b>psnumsuf</b><b>&quot;</b> value<i>=</i><b>&quot;</b><i>(</i><i>[</i><b>Ll</b><i>]</i><i>?</i><i>(</i><i>?</i><b>:KB</b><i>|</i><b>MB</b><i>|</i><b>GB</b><i>)</i><i>?</i><i>)</i><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSNumber</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>B</b><i>.</i><b>?~1</b><i>.</i><b>d</b><i>+</i><b>%psnumexp;</b><i>?</i><b>%psnumsuf;</b><b>b</b><b>/</b><b>i</b><b>&quot;</b> region0<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberFloat</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberSuffix</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>b</b><b>d</b><i>+</i><i>.</i><i>.</i><b>?!</b><b>d</b><i>*</i><i>(</i><i>?</i><b>:</b><b>%psnumexp;</b><i>?</i><b>%psnumsuf;</b><b>b</b><i>|</i><b>B</b><i>)</i><b>/</b><b>i</b><b>&quot;</b> region0<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberFloat</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberSuffix</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>b</b><b>d</b><i>+</i><b>%psnumexp;</b><b>%psnumsuf;</b><b>b</b><b>/</b><b>i</b><b>&quot;</b> region0<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberFloat</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberSuffix</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>b</b><b>0</b><i>[</i><b>xX</b><i>]</i><i>[</i><b>d</b><b>a</b><i>-</i><b>fA</b><i>-</i><b>F</b><i>]</i><i>+</i><b>%psnumsuf;</b><b>b</b><b>/</b><b>i</b><b>&quot;</b> region0<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberHex</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberSuffix</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>b</b><b>d</b><i>+</i><b>%psnumsuf;</b><b>b</b><b>/</b><b>i</b><b>&quot;</b> region0<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberDec</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>NumberSuffix</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Content in '' </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSAposContent</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>''</b><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>StringContent</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Content in &quot;&quot; </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSQuotContent</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSEscaped</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSVariable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSExpanded</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Content of output </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PSOutputContent</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>^</i><b>ERROR</b><i>(</i><i>?</i><b>::</b><i>|</i><b>b</b><i>)</i><i>|</i><i>&lt;</i><i>&lt;</i><i>&lt;</i><i>&lt;</i><i>(</i><i>?</i><b>:</b><b>s</b><i>|</i><i>$</i><i>)</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Error</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>^</i><b>WARNING</b><b>b</b><i>.</i><i>*</i><i>$</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>StringContent</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>^</i><i>(</i><i>?</i><b> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> EBUG</b><i>|</i><b>VERBOSE</b><i>)</i><b>b</b><i>.</i><i>*</i><i>$</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Comment</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSNumber</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<i>&lt;!--</i><i> Main </i><i>--&gt;</i>
<b>&lt;</b><b>scheme</b> name<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b><b>&gt;</b>

<i>&lt;!--</i><i> Output </i><i>--&gt;</i>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>^</i><i>x1A</i><i>$</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>^</i><i>x1B</i><i>$</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSOutputContent</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Comments </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>?</i><b>:</b><i>^</i><i>|</i><b>s</b><i>)</i><b>###</b><b>s</b><i>+</i><i>(</i><i>.</i><i>*</i><i>)</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Comment</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Outlined</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>?</i><b>:</b><i>^</i><i>|</i><b>s</b><i>)</i><b>##</b><i>.</i><i>*</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>CommentDoc</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>?</i><b>:</b><i>^</i><i>|</i><b>s</b><i>)</i><b>#</b><i>.</i><i>*</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Comment</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Apos-strings </i><i>--&gt;</i>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><b>@</b><i>x27</i><i>$</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>^</i><i>x27</i><b>@</b><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSAposContent</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>String</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>x27</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>x27</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSAposContent</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>String</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Escaped </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSEscaped</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Expanded </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSExpanded</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Array </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSArray</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Hash </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSHash</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Quot-strings </i><i>--&gt;</i>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><b>@</b><i>x22</i><i>$</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>^</i><i>x22</i><b>@</b><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSQuotContent</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>String</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>block</b> start<i>=</i><b>&quot;</b><b>/</b><i>x22</i><b>/</b><b>&quot;</b> end<i>=</i><b>&quot;</b><b>/</b><i>x22</i><b>/</b><b>&quot;</b> scheme<i>=</i><b>&quot;</b><b>PSQuotContent</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>String</b><b>&quot;</b> region00<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairStart</b><b>&quot;</b> region10<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairEnd</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Types [xxx.xxx], [xxx[]] except [1], [$i] </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>[</i><i>[</i><b>A</b><i>-</i><b>Za</b><i>-</i><b>z</b><i>]</i><i>[</i><b>w</b><b>.</b><i>]</i><i>*</i><i>(</i><i>?</i><b>:</b><i>[</i><i>]</i><i>)</i><i>*</i><i>]</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>TypeKeyword</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Brackets </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairedBrackets</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>virtual</b> scheme<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>PairedBrackets</b><b>&quot;</b> subst-scheme<i>=</i><b>&quot;</b><b>PowerShell</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>inherit</b><b>&gt;</b>

<i>&lt;!--</i><i> Function </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>(</i><i>?</i><b>:</b><i>^</i><i>|</i><b>~</b><i>|</i><i>[</i><b>;</b><i>&#125;</i><i>]</i><b>?#1</b><i>)</i><b>s</b><i>*</i><i>(</i><b>function</b><i>|</i><b>filter</b><i>)</i><b>s</b><i>+</i><i>(</i><i>[</i><i>^</i><b>s</b><i>(</i><i>]</i><i>+</i><i>)</i><b>/</b><b>i</b><b>&quot;</b> region1<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>FunctionKeyword</b><b>&quot;</b> region2<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Identifier</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Outlined</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Pipeline and redirection </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>KeywordStrong</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>|</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>&amp;</b><b>gt</b><b>;</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>&amp;</b><b>gt</b><b>;</b><b>&amp;</b><b>gt</b><b>;</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>2</b><b>&amp;</b><b>gt</b><b>;</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>2</b><b>&amp;</b><b>gt</b><b>;</b><b>&amp;</b><b>amp</b><b>;</b><b>1</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>2</b><b>&amp;</b><b>gt</b><b>;</b><b>&amp;</b><b>gt</b><b>;</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> Redirection operators (not yet) </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Error</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>&amp;</b><b>lt</b><b>;</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>1</b><b>&amp;</b><b>gt</b><b>;</b><b>&amp;</b><b>amp</b><b>;</b><b>2</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> Numbers </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSNumber</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Cmdlets </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Keyword</b><b>&quot;</b> worddiv<i>=</i><b>&quot;</b><b>[</b><b>s</b><i>(</i><i>)</i><i>&#123;</i><i>&#125;</i><b>;=|</b><b>]</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Add-Content</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Add-History</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Add-Member</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Add-PSSnapin</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Clear-Content</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Clear-Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Clear-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Clear-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Clear-Variable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Compare-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>ConvertFrom-SecureString</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Convert-Path</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>ConvertTo-Html</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>ConvertTo-SecureString</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Copy-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Copy-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Export-Alias</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Export-Clixml</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Export-Console</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Export-Csv</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>ForEach-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Format-Custom</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Format-List</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Format-Table</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Format-Wide</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Acl</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Alias</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-AuthenticodeSignature</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-ChildItem</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Command</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Content</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Credential</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Culture</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Date</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-EventLog</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-ExecutionPolicy</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Help</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-History</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Location</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Member</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-PfxCertificate</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Process</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-PSDrive</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-PSProvider</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-PSSnapin</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-TraceSource</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-UICulture</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Unique</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-Variable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Get-WmiObject</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Group-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Import-Alias</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Import-Clixml</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Import-Csv</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Invoke-Expression</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Invoke-History</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Invoke-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Join-Path</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Measure-Command</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Measure-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Move-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Move-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-Alias</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-PSDrive</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-TimeSpan</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>New-Variable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-Default</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-File</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-Null</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-Printer</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Out-String</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Pop-Location</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Push-Location</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Read-Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Remove-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Remove-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Remove-PSDrive</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Remove-PSSnapin</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Remove-Variable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Rename-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Rename-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Resolve-Path</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Restart-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Resume-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Select-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Select-String</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Acl</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Alias</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-AuthenticodeSignature</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Content</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Date</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-ExecutionPolicy</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Item</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-ItemProperty</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Location</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-PSDebug</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-TraceSource</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Set-Variable</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Sort-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Split-Path</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Start-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Start-Sleep</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Start-Transcript</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Stop-Process</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Stop-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Stop-Transcript</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Suspend-Service</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Tee-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Test-Path</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Trace-Command</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Update-FormatData</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Update-TypeData</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Where-Object</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Debug</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Error</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Output</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Progress</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Verbose</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>Write-Warning</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> System variables </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Constant</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$$</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$?</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$^</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$_</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$args</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ConfirmPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ConsoleFileName</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$DebugPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$Error</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ErrorActionPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ErrorView</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ExecutionContext</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$false</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$FormatEnumerationLimit</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$HOME</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$Host</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$input</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$LastExitCode</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$Matches</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumAliasCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumDriveCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumErrorCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumFunctionCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumHistoryCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MaximumVariableCount</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$MyInvocation</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$NestedPromptLevel</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$null</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$OFS</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$PID</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$PROFILE</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ProgressPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$PSHOME</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$PWD</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ReportErrorShowExceptionClass</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ReportErrorShowInnerException</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ReportErrorShowSource</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ReportErrorShowStackTrace</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$ShellId</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$this</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$true</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$VerbosePreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$WarningPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>$WhatIfPreference</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> User variables </i><i>--&gt;</i>
<b>&lt;</b><b>inherit</b> scheme<i>=</i><b>&quot;</b><b>PSVariable</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Operators </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Operator</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-eq</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ne</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ge</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-gt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-lt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-le</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-like</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-notlike</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-match</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-notmatch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-replace</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-contains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-notcontains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ieq</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ine</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ige</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-igt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ile</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ilt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ilike</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-inotlike</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-imatch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-inotmatch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ireplace</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-icontains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-inotcontains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ceq</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cne</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cge</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cgt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-clt</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cle</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-clike</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cnotlike</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cmatch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cnotmatch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-creplace</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-ccontains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-cnotcontains</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-is</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-isnot</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-as</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-and</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-not</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-or</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-xor</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-band</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-bor</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-bxor</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>-f</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>--</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>++</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>+=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>-=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>*=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>/=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>%=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>=</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>+</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>*</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>/</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>symb</b> name<i>=</i><b>&quot;</b><b>%</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> Operator - </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>-</i><i>[</i><b>A</b><i>-</i><b>Za</b><i>-</i><b>z_</b><i>]</i><b>?!</b><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Operator</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Keywords (filter and function are excluded) </i><i>--&gt;</i>
<b>&lt;</b><b>keywords</b> ignorecase<i>=</i><b>&quot;</b><b>yes</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Keyword</b><b>&quot;</b> worddiv<i>=</i><b>&quot;</b><b>[</b><b>s</b><i>(</i><i>)</i><i>&#123;</i><i>&#125;</i><b>;</b><b>]</b><b>&quot;</b><b>&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>begin</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>break</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>continue</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>default</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>do</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>else</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>elseif</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>end</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>exit</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>finally</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>for</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>foreach</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>if</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>in</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>param</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>process</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>return</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>switch</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>throw</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>trap</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>until</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;</b><b>word</b> name<i>=</i><b>&quot;</b><b>while</b><b>&quot;</b><b>/&gt;</b>
<b>&lt;/</b><b>keywords</b><b>&gt;</b>

<i>&lt;!--</i><i> Identifiers (very simplified) </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>[</i><b>A</b><i>-</i><b>Za</b><i>-</i><b>z_</b><i>]</i><i>[</i><i>-</i><b>w</b><i>]</i><i>*</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Identifier</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Error: (ok, warning): redundant semicolon </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>;</b><b>s</b><i>*</i><i>&#125;</i><i>?</i><i>(</i><i>?</i><b>:</b><b>s</b><i>*</i><i>|</i><b>s</b><i>+</i><b>#</b><i>.</i><i>*</i><i>)</i><i>$</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Error</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Error: bad string: symbols after @' or @&quot; </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><b>@</b><i>[</i><i>x22</i><i>x27</i><i>]</i><i>.</i><i>$</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Error</b><b>&quot;</b><b>/&gt;</b>

<i>&lt;!--</i><i> Separators </i><i>--&gt;</i>
<b>&lt;</b><b>regexp</b> match<i>=</i><b>&quot;</b><b>/</b><i>[</i><b>,;</b><i>]</i><b>/</b><b>&quot;</b> region<i>=</i><b>&quot;</b><b>def</b><i>:</i><b>Operator</b><b>&quot;</b><b>/&gt;</b>

<b>&lt;/</b><b>scheme</b><b>&gt;</b>

<b>&lt;/</b><b>type</b><b>&gt;</b>
<b>&lt;/</b><b>hrc</b><b>&gt;</b>

<i>&lt;!--</i><i> ***** BEGIN LICENSE BLOCK *****</i>
<i>- Version: MPL 1.1/GPL 2.0/LGPL 2.1</i>
<i>-</i>
<i>- The contents of this file are subject to the Mozilla Public License Version</i>
<i>- 1.1 (the &quot;License&quot;); you may not use this file except in compliance with</i>
<i>- the License. You may obtain a copy of the License at</i>
<i>- </i><u>http://www.mozilla.org/MPL/</u><i></i>
<i>-</i>
<i>- Software distributed under the License is distributed on an &quot;AS IS&quot; basis,</i>
<i>- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License</i>
<i>- for the specific language governing rights and limitations under the</i>
<i>- License.</i>
<i>-</i>
<i>- The Original Code is the Colorer Library.</i>
<i>-</i>
<i>- The Initial Developer of the Original Code is</i>
<i>- </i><i>Cail Lomecb</i><i> </i><b>&lt;</b><u>cail@nm.ru</u><b>&gt;</b><i>.</i>
<i>- Portions created by the Initial Developer are Copyright (C) 1999-2005</i>
<i>- the Initial Developer. All Rights Reserved.</i>
<i>-</i>
<i>- Contributor(s):</i>
<i>- Roman Kuzmin </i><b>&lt;</b><u>nightroman@hotmail.com</u><b>&gt;</b><i></i>
<i>-</i>
<i>- Alternatively, the contents of this file may be used under the terms of</i>
<i>- either the GNU General Public License Version 2 or later (the &quot;GPL&quot;), or</i>
<i>- the GNU Lesser General Public License Version 2.1 or later (the &quot;LGPL&quot;),</i>
<i>- in which case the provisions of the GPL or the LGPL are applicable instead</i>
<i>- of those above. If you wish to allow use of your version of this file only</i>
<i>- under the terms of either the GPL or the LGPL, and not to allow others to</i>
<i>- use your version of this file under the terms of the MPL, indicate your</i>
<i>- decision by deleting the provisions above and replace them with the notice</i>
<i>- and other provisions required by the LGPL or the GPL. If you do not delete</i>
<i>- the provisions above, a recipient may use your version of this file under</i>
<i>- the terms of any one of the MPL, the GPL or the LGPL.</i>
<i>-</i>
<i>- ***** END LICENSE BLOCK ***** </i><i>--&gt;</i>

</pre>
<hr />
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nightroman.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nightroman.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nightroman.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nightroman.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nightroman.wordpress.com&#038;blog=16300345&#038;post=5&#038;subd=nightroman&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nightroman.wordpress.com/2006/12/07/powershell-syntax-description-for-colorer-and-far-manager-editor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd96dd04d8e727f594564ed7adbab7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nightroman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
