en-US/Microsoft.PowerShell.Crescendo-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>Export-CrescendoModule</command:name> <command:verb>Export</command:verb> <command:noun>CrescendoModule</command:noun> <maml:description> <maml:para>Creates a module from PowerShell Crescendo JSON configuration files</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet exports an object that can be converted into a function that acts as a proxy for a platform specific command. The resultant module file should be executable down to version 5.1 of PowerShell.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Export-CrescendoModule</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module file you wish to create. You can omit the trailing `.psm1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="true" pipelineInput="True (ByPropertyName)" position="2" aliases="none"> <maml:name>ConfigurationFile</maml:name> <maml:description> <maml:para>This is a list of JSON files which represent the proxies for the module</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String[]</command:parameterValue> <dev:type> <maml:name>System.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>Force</maml:name> <maml:description> <maml:para>By default, if `Export-CrescendoModule` finds an already created module, it will not overwrite the existing file. Use the Force parameter to overwrite the existing file, or remove it prior to running `Export-CrescendoModule`.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.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="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.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="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="true" pipelineInput="True (ByPropertyName)" position="2" aliases="none"> <maml:name>ConfigurationFile</maml:name> <maml:description> <maml:para>This is a list of JSON files which represent the proxies for the module</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String[]</command:parameterValue> <dev:type> <maml:name>System.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>Force</maml:name> <maml:description> <maml:para>By default, if `Export-CrescendoModule` finds an already created module, it will not overwrite the existing file. Use the Force parameter to overwrite the existing file, or remove it prior to running `Export-CrescendoModule`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.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="1" aliases="none"> <maml:name>ModuleName</maml:name> <maml:description> <maml:para>The name of the module file you wish to create. You can omit the trailing `.psm1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.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="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Internally, this function calls the `Import-CommandConfiguration` cmdlet that returns a command object. All files provided in the ConfigurationFile parameter are then used to create each individual function. Finally, all proxies are used to create an `Export-ModuleMember` command invocation, so when the resultant module is imported, the module has all the command proxies available.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>Export-CrescendoModule -ModuleName netsh -ConfigurationFile netsh*.json Import-Module ./netsh.psm1</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>Export-CrescendoModule netsh netsh*.json -force</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/export-crescendomodule?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Import-CommandConfiguration</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>Export-Schema</command:name> <command:verb>Export</command:verb> <command:noun>Schema</command:noun> <maml:description> <maml:para>Exports the JSON schema for command configuration as a PowerShell object.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Exports the JSON schema for command configuration as a PowerShell object.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Export-Schema</maml:name> </command:syntaxItem> </command:syntax> <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>Export-Schema</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/export-schema?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Import-CommandConfiguration</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>Import-CommandConfiguration</command:name> <command:verb>Import</command:verb> <command:noun>CommandConfiguration</command:noun> <maml:description> <maml:para>Import a PowerShell Crescendo json file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet exports an object that can be converted into a function that acts as a proxy for the platform specific command. The resultant object may then be used to call a native command that can participate in the PowerShell pipeline. The `ToString` method of the output object returns a string that can be used to create a function that calls the native command. Microsoft Windows, Linux, and macOS can run the generated function, if the native command is on all of the platform.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Import-CommandConfiguration</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>file</maml:name> <maml:description> <maml:para>The json file which represents the command to be wrapped.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="0" aliases="none"> <maml:name>file</maml:name> <maml:description> <maml:para>The json file which represents the command to be wrapped.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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>A Command object</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The object returned by `Import-CommandConfiguration` is converted through the `ToString` method. Generally, you should use the `Export-CrescendoModule`, which creates a PowerShell `.psm1` file.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>Import-CommandConfiguration ifconfig.crescendo.json Verb : Invoke Noun : ifconfig OriginalName : ifconfig OriginalCommandElements : Aliases : DefaultParameterSetName : SupportsShouldProcess : False SupportsTransactions : False NoInvocation : False Description : This is a description of the generated function Usage : .SYNOPSIS Run invoke-ifconfig Parameters : {[Parameter()] [string]$Interface = ""} Examples : OriginalText : HelpLinks : OutputHandlers :</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/import-commandconfiguration?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Export-CrescendoModule</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>New-CrescendoCommand</command:name> <command:verb>New</command:verb> <command:noun>CrescendoCommand</command:noun> <maml:description> <maml:para>Creates a PowerShell command object.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates a PowerShell command object. You can use this object to set the properties of the command you are defining. The resulting object can be converted to JSON to be added to a configuration file.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-CrescendoCommand</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Verb</maml:name> <maml:description> <maml:para>The verb of the cmdlet you are defining.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Noun</maml:name> <maml:description> <maml:para>The noun of the cmdlet you are defining.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="2" aliases="none"> <maml:name>OriginalName</maml:name> <maml:description> <maml:para>The name of the native command executable to run.</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="1" aliases="none"> <maml:name>Noun</maml:name> <maml:description> <maml:para>The noun of the cmdlet you are defining.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="2" aliases="none"> <maml:name>OriginalName</maml:name> <maml:description> <maml:para>The name of the native command executable to run.</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="False" position="0" aliases="none"> <maml:name>Verb</maml:name> <maml:description> <maml:para>The verb of the cmdlet you are defining.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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 - Create a new command and convert it to JSON ---</maml:title> <dev:code>PS> New-CrescendoCommand -Verb Get -Noun Something -OriginalName "native.exe" | ConvertTo-Json { "Verb": "Get", "Noun": "Something", "OriginalName": "native.exe", "OriginalCommandElements": null, "Platform": [ "Windows", "Linux", "MacOS" ], "Elevation": null, "Aliases": null, "DefaultParameterSetName": null, "SupportsShouldProcess": false, "ConfirmImpact": null, "SupportsTransactions": false, "NoInvocation": false, "Description": null, "Usage": null, "Parameters": [], "Examples": [], "OriginalText": null, "HelpLinks": null, "OutputHandlers": null, "FunctionName": "Get-Something" }</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/new-crescendocommand?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ExampleInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-OutputHandler</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ParameterInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-UsageInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>New-ExampleInfo</command:name> <command:verb>New</command:verb> <command:noun>ExampleInfo</command:noun> <maml:description> <maml:para>Creates a PowerShell object representing an example used in a Crescendo command object.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates a PowerShell object representing an example used in a Crescendo command object. The resulting object can be converted to JSON to be inserted into a configuration file or added to a command object coversion to JSON later.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-ExampleInfo</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>command</maml:name> <maml:description> <maml:para>The command line for the example being described.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>originalCommand</maml:name> <maml:description> <maml:para>The original native command that is run for this cmdlet example.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>description</maml:name> <maml:description> <maml:para>The description of the example.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="0" aliases="none"> <maml:name>command</maml:name> <maml:description> <maml:para>The command line for the example being described.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>description</maml:name> <maml:description> <maml:para>The description of the example.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>originalCommand</maml:name> <maml:description> <maml:para>The original native command that is run for this cmdlet example.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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> New-ExampleInfo -command Get-Something -originalCommand native.exe -description 'this is some text' | ConvertTo-Json { "Command": "Get-Something", "OriginalCommand": "native.exe", "Description": "this is some text" }</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/new-exampleinfo?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-CrescendoCommand</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-OutputHandler</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ParameterInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-UsageInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>New-OutputHandler</command:name> <command:verb>New</command:verb> <command:noun>OutputHandler</command:noun> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo output handler.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo output handler. You can assign values to the properties of the object. The resulting object can be added to the OutputHanders property of a command object or it can be converted to JSON to be inserted in the configuration file.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-OutputHandler</maml:name> </command:syntaxItem> </command:syntax> <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 - Create a new output handler object and convert it to JSON</maml:title> <dev:code>PS> $outhandler = New-OutputHandler PS> $outhandler.ParameterSetName = 'Default' PS> $outhandler.Handler = 'ParseShadowStorage' PS> $outhandler.HandlerType = 'Function' PS> $outhandler | ConvertTo-Json { "ParameterSetName": "Default", "Handler": "ParseShadowStorage", "HandlerType": "Function", "StreamOutput": false }</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/new-outputhandler?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-CrescendoCommand</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ExampleInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ParameterInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-UsageInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>New-ParameterInfo</command:name> <command:verb>New</command:verb> <command:noun>ParameterInfo</command:noun> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo Parameter definition.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo Parameter definition. You can assign values to the properties of the object. The resulting object can be added to the Parameters property of a command object or it can be converted to JSON to be inserted in the configuration file.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-ParameterInfo</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the parameter for the cmdlet being defined.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>OriginalName</maml:name> <maml:description> <maml:para>The original parameter used by the native executable.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the parameter for the cmdlet being defined.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>OriginalName</maml:name> <maml:description> <maml:para>The original parameter used by the native executable.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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 - Create a new parameter object ----------</maml:title> <dev:code>PS> $param = New-ParameterInfo -Name ComputerName -OriginalName '--targethost' PS> $param Name : ComputerName OriginalName : --targethost OriginalText : Description : DefaultValue : DefaultMissingValue : ApplyToExecutable : False ParameterType : object AdditionalParameterAttributes : Mandatory : False ParameterSetName : Aliases : Position : 2147483647 OriginalPosition : 0 ValueFromPipeline : False ValueFromPipelineByPropertyName : False ValueFromRemainingArguments : False NoGap : False</dev:code> <dev:remarks> <maml:para>{{ Add example description here }}</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/new-parameterinfo?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-CrescendoCommand</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ExampleInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-OutputHandler</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-UsageInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>New-UsageInfo</command:name> <command:verb>New</command:verb> <command:noun>UsageInfo</command:noun> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo Usage definition.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates a PowerShell object representing a Crescendo Usage definition. You can assign values to the properties of the object. The resulting object can be added to the Usage property of a command object or it can be converted to JSON to be inserted in the configuration file. The Synopsis of the object is inserted in the module as comment-based help under the `.SYNOPSIS` keyword.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-UsageInfo</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>usage</maml:name> <maml:description> <maml:para>The text describing the purpose of the cmdlet.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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="0" aliases="none"> <maml:name>usage</maml:name> <maml:description> <maml:para>The text describing the purpose of the cmdlet.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.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 - Create a Usage object and convert it to JSON ---</maml:title> <dev:code>PS> $usage = New-UsageInfo -usage 'This is a description for how to use the cmdlet.' PS> $usage | ConvertTo-Json { "Synopsis": "This is a description for how to use the cmdlet.", "SupportsFlags": false, "HasOptions": false, "OriginalText": null }</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/new-usageinfo?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-CrescendoCommand</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ExampleInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-OutputHandler</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-ParameterInfo</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </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>Test-IsCrescendoCommand</command:name> <command:verb>Test</command:verb> <command:noun>IsCrescendoCommand</command:noun> <maml:description> <maml:para>Tests a cmdlet to see if it was created by Crescendo.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Tests a cmdlet to see if it was created by Crescendo.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Test-IsCrescendoCommand</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Command</maml:name> <maml:description> <maml:para>The name of the cmdlet to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue> <dev:type> <maml:name>Object[]</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="True (ByValue)" position="0" aliases="none"> <maml:name>Command</maml:name> <maml:description> <maml:para>The name of the cmdlet to test.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue> <dev:type> <maml:name>Object[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.Object[]</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 - Test various cmdlet to see if they were created by Crescendo</maml:title> <dev:code>PS> Test-IsCrescendoCommand Get-Command Test-IsCrescendoCommand: 'Get-Command' is not a function PS> Test-IsCrescendoCommand Expand-Archive Module: Microsoft.PowerShell.Archive Name IsCrescendoCommand RequiresElevation ---- ------------------ ----------------- Expand-Archive False False PS> Test-IsCrescendoCommand Get-VssProvider Module: VssAdmin Name IsCrescendoCommand RequiresElevation ---- ------------------ ----------------- Get-VssProvider True False</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://docs.microsoft.com/powershell/module/microsoft.powershell.crescendo/test-iscrescendocommand?view=ps-modules&wt.mc_id=ps-gethelp</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |