PowerShellToolsPro.Cmdlets.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>ConvertTo-CSharp</command:name>
      <command:verb>ConvertTo</command:verb>
      <command:noun>CSharp</command:noun>
      <maml:description>
        <maml:para>Converts PowerShell script to C# code.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Converts PowerShell script to C# code. You can specify a path, PowerShell script text or a PowerShell script block.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertTo-CSharp</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>PowerShellScript</maml:name>
          <maml:Description>
            <maml:para>The contents of a PowerShell script</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>ConvertTo-CSharp</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
          <maml:name>PowerShellScriptPath</maml:name>
          <maml:Description>
            <maml:para>The path to a PS1 or PSM1 file.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>ConvertTo-CSharp</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
          <maml:name>ScriptBlock</maml:name>
          <maml:Description>
            <maml:para>A PowerShell ScriptBlock</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
          <dev:type>
            <maml:name>ScriptBlock</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>PowerShellScript</maml:name>
        <maml:Description>
          <maml:para>The contents of a PowerShell script</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
        <maml:name>PowerShellScriptPath</maml:name>
        <maml:Description>
          <maml:para>The path to a PS1 or PSM1 file.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
        <maml:name>ScriptBlock</maml:name>
        <maml:Description>
          <maml:para>A PowerShell ScriptBlock</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
        <dev:type>
          <maml:name>ScriptBlock</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>System.Management.Automation.ScriptBlock</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1</maml:title>
        <dev:code>PS C:\&gt; ConvertTo-CSharp -PowerShellScriptPath .\*.ps1</dev:code>
        <dev:remarks>
          <maml:para>Converts all PS1 files in the current directory to C# code. Returns an array of the contents of the files.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2</maml:title>
        <dev:code>PS C:\&gt; ConvertTo-CSharp -PowerShellScript "Get-Process"</dev:code>
        <dev:remarks>
          <maml:para>Converts the specified PowerShell script to C# code.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 3</maml:title>
        <dev:code>PS C:\&gt; ConvertTo-CSharp -ScriptBlock { Get-Process }</dev:code>
        <dev:remarks>
          <maml:para>Converts the specified PowerShell ScriptBlock to C# code.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>ConvertTo-PowerShell</command:name>
      <command:verb>ConvertTo</command:verb>
      <command:noun>PowerShell</command:noun>
      <maml:description>
        <maml:para>Converts C# code to PowerShell script.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Converts C# code to PowerShell script.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertTo-PowerShell</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>CSharpCode</maml:name>
          <maml:Description>
            <maml:para>C# code to convert</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>ConvertTo-PowerShell</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
          <maml:name>CSharpFilePath</maml:name>
          <maml:Description>
            <maml:para>C# file (cs) to convert</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>CSharpCode</maml:name>
        <maml:Description>
          <maml:para>C# code to convert</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
        <maml:name>CSharpFilePath</maml:name>
        <maml:Description>
          <maml:para>C# file (cs) to convert</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1</maml:title>
        <dev:code>PS C:\&gt; ConvertTo-PowerShell -CSharpCode "void CreateDate(int year) { new DateTime(year); }"</dev:code>
        <dev:remarks>
          <maml:para>Converts the CreateDate method to a PowerShell function.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2</maml:title>
        <dev:code>PS C:\&gt; ConvertTo-PowerShell -CSharpFilePath .\*.cs</dev:code>
        <dev:remarks>
          <maml:para>Converts all the CS files into PowerShell script and returns them as a collection of strings.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Install-PoshProToolsLicense</command:name>
      <command:verb>Install</command:verb>
      <command:noun>PoshProToolsLicense</command:noun>
      <maml:description>
        <maml:para>Installs a PowerShell Pro Tools license.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Installs a PowerShell Pro Tools license.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Install-PoshProToolsLicense</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>License</maml:name>
          <maml:Description>
            <maml:para>License to install. This should be the content of the license and not a path.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>License</maml:name>
        <maml:Description>
          <maml:para>License to install. This should be the content of the license and not a path.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1</maml:title>
        <dev:code>PS C:\&gt; Install-PoshProToolsLicense -License "&lt;License&gt;&lt;Terms&gt;asdfas&lt;/Terms&gt;&lt;/License&gt;"</dev:code>
        <dev:remarks>
          <maml:para>Installs the specified PowerShell Pro Tools license.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Merge-Script</command:name>
      <command:verb>Merge</command:verb>
      <command:noun>Script</command:noun>
      <maml:description>
        <maml:para>Packages, bundles and\or obfuscates scripts.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Packages, bundles and\or obfuscates scripts. Packaging and bundling are not mutually exclusive. Obfuscation requires packaging.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Merge-Script</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Bundle</maml:name>
          <maml:Description>
            <maml:para>Bundles the script with dot sourced scripts found in the script.</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Obfuscate</maml:name>
          <maml:Description>
            <maml:para>Obfuscate the .NET executable and PowerShell script.</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>OutputPath</maml:name>
          <maml:Description>
            <maml:para>The output path for the resulting script or executable. This should be a directory.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Package</maml:name>
          <maml:Description>
            <maml:para>Package the script as a .NET executable.</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Script</maml:name>
          <maml:Description>
            <maml:para>The script to package in an executable and optionally bundle with other scripts.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Bundle</maml:name>
        <maml:Description>
          <maml:para>Bundles the script with dot sourced scripts found in the script.</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Obfuscate</maml:name>
        <maml:Description>
          <maml:para>Obfuscate the .NET executable and PowerShell script.</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>OutputPath</maml:name>
        <maml:Description>
          <maml:para>The output path for the resulting script or executable. This should be a directory.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Package</maml:name>
        <maml:Description>
          <maml:para>Package the script as a .NET executable.</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Script</maml:name>
        <maml:Description>
          <maml:para>The script to package in an executable and optionally bundle with other scripts.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1</maml:title>
        <dev:code>PS C:\&gt; Merge-Script -Script .\MyScript.ps1 -Output .\ -Package</dev:code>
        <dev:remarks>
          <maml:para>Packages MyScript.ps1 into MyScript.exe and then outputs it to .\</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2</maml:title>
        <dev:code>PS C:\&gt; Merge-Script -Script .\MyScript.ps1 -Output .\Bundle -Bundle</dev:code>
        <dev:remarks>
          <maml:para>Bundles MyScript.ps1 and any scripts it dot sources into a single file and outputs it to .\Bundle.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 3</maml:title>
        <dev:code>PS C:\&gt; Merge-Script -Script .\MyScript.ps1 -Output .\Bundle -Bundle -Package</dev:code>
        <dev:remarks>
          <maml:para>Bundles MyScript.ps1 and any scripts it dot sources into a single file and then packages it into MyScript.exe and outputs it to .\Bundle.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 4</maml:title>
        <dev:code>PS C:\&gt; Merge-Script -Script .\MyScript.ps1 -Output .\Bundle -Bundle -Package -Obfuscate</dev:code>
        <dev:remarks>
          <maml:para>Bundles MyScript.ps1 and any scripts it dot sources into a single file and then packages it into MyScript.exe and outputs it to .\Bundle. The resulting executable will be obfuscated.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>