en-US/EasyAzureFunction-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>Get-Parameter</command:name> <command:verb>Get</command:verb> <command:noun>Parameter</command:noun> <maml:description> <maml:para>Function lists parameters for a given command</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Function lists parameters for a given command</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-Parameter</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Name, ScriptName"> <maml:name>CommandName</maml:name> <maml:Description> <maml:para>Specify for which command it will output parameters.</maml:para> <maml:para>Ultimately, this value(s) will be passed to Get-Command commandlet.</maml:para> <maml:para>It can be also specified as script name (ending with .ps1), if that script has input parameters.</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>IncludeCommonParameters</maml:name> <maml:Description> <maml:para>By default, script will exclude common parameters (like -Verbose, -ErrorAction, etc.) even if they are supported by command. If you want them included, specify this switch.</maml:para> </maml:Description> <dev:type> <maml:name>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="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Name, ScriptName"> <maml:name>CommandName</maml:name> <maml:Description> <maml:para>Specify for which command it will output parameters.</maml:para> <maml:para>Ultimately, this value(s) will be passed to Get-Command commandlet.</maml:para> <maml:para>It can be also specified as script name (ending with .ps1), if that script has input parameters.</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>IncludeCommonParameters</maml:name> <maml:Description> <maml:para>By default, script will exclude common parameters (like -Verbose, -ErrorAction, etc.) even if they are supported by command. If you want them included, specify this switch.</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: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>EzAzF_ParameterInfo</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:\> Get-Parameter Get-Location</dev:code> <dev:remarks> <maml:para>It will return an array with all 5 parameters that commandlet Get-Location has.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Parameter Get-Command | Format-Table</dev:code> <dev:remarks> <maml:para>For majority of commands, it is better to format output as table, if no further processing is done.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-Command *-Host | Get-Parameter | Format-Table</dev:code> <dev:remarks> <maml:para>Input for Get-Command can be also via pipeline.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> Get-Command -Module Microsoft.* | Get-Parameter | ? Mandatory | ? ValidateSet | Format-Table</dev:code> <dev:remarks> <maml:para>Lists all mandatory parameters with predefined set of values in all loaded Microsoft modules.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 5 --------------------------</maml:title> <dev:code>PS C:\> Get-Parameter -ScriptName LoremIpsum.ps1</dev:code> <dev:remarks> <maml:para>Lists all parameters for a given script name.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>GitHub repository</maml:linkText> <maml:uri>https://github.com/iricigor/EasyAzureFunction</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-AzureFunctionCode</command:name> <command:verb>New</command:verb> <command:noun>AzureFunctionCode</command:noun> <maml:description> <maml:para>Function generates two files (index.html and run.ps1) that can be used to run Azure Function.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Function generates two files (index.html and run.ps1) that can be used to run Azure Function. File run.ps1 is default runner script that is executed each time new request is received. In case, there are no parameters passed by, it will invoke default page index.html which helps to submit parameters.</maml:para> <maml:para>For more info, see README on GitHub repository, link is provided below.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-AzureFunctionCode</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Path where new files will be located. If folder is not existing, it will be created. If files in the folder are existing, they will be overwritten.</maml:para> <maml:para>If more than one command is specified, each command will get sub-folder under path. Name of sub-folder will be equal to command name.</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>Invoke</maml:name> <maml:Description> <maml:para>If specify it will open target folder where new files are located.</maml:para> <maml:para>If more than one command is specified, it will open parent folder.</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="True (ByPropertyName, ByValue)" position="named" aliases="Name, ScriptName"> <maml:name>CommandName</maml:name> <maml:Description> <maml:para>Name of the command for which files will be generated. Ultimately, this value(s) will be passed to Get-Command commandlet.</maml:para> <maml:para>It can be also specified as script name (ending with .ps1), if that script has input parameters. Commandlet will also copy mentioned script to target folder, next to standard two files index.html and run.ps1. You need to copy your custom script (i.e. all three files from folder) to Azure Function folder before running it in cloud.</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>PreCode</maml:name> <maml:Description> <maml:para>If you want to execute custom PowerShell commands before running your command, specify it as -PreCode. This can be for example definition of your custom function, or installing/importing some 3rd party modules.</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>PostCode</maml:name> <maml:Description> <maml:para>If you want to execute custom PowerShell commands after running your command, specify it as -PostCode. This is similar to -PreCode attribute.</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>Invoke</maml:name> <maml:Description> <maml:para>If specify it will open target folder where new files are located.</maml:para> <maml:para>If more than one command is specified, it will open parent folder.</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="1" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Path where new files will be located. If folder is not existing, it will be created. If files in the folder are existing, they will be overwritten.</maml:para> <maml:para>If more than one command is specified, each command will get sub-folder under path. Name of sub-folder will be equal to command name.</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 (ByPropertyName, ByValue)" position="named" aliases="Name, ScriptName"> <maml:name>CommandName</maml:name> <maml:Description> <maml:para>Name of the command for which files will be generated. Ultimately, this value(s) will be passed to Get-Command commandlet.</maml:para> <maml:para>It can be also specified as script name (ending with .ps1), if that script has input parameters. Commandlet will also copy mentioned script to target folder, next to standard two files index.html and run.ps1. You need to copy your custom script (i.e. all three files from folder) to Azure Function folder before running it in cloud.</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>PreCode</maml:name> <maml:Description> <maml:para>If you want to execute custom PowerShell commands before running your command, specify it as -PreCode. This can be for example definition of your custom function, or installing/importing some 3rd party modules.</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>PostCode</maml:name> <maml:Description> <maml:para>If you want to execute custom PowerShell commands after running your command, specify it as -PostCode. This is similar to -PreCode attribute.</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:\> New-AzureFunctionCode Get-Command -Invoke</dev:code> <dev:remarks> <maml:para>It will generate files used for running PowerShell commandlet Get-Command in Azure Function.</maml:para> <maml:para>Files will be located in TEMP folder which will be invoked (opened) via default application (usually Windows Explorer)</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> New-AzureFunctionCode -Command Get-Location, Get-Process -Path C:\EzAzF</dev:code> <dev:remarks> <maml:para>It will generate files used for running specified two PowerShell commandlets.</maml:para> <maml:para>Each commandlet will get its own folder under specified path.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> New-AzureFunctionCode -CommandName Hello -PreCode 'function Hello([string]$Name="World"){"Hello $Name"}'</dev:code> <dev:remarks> <maml:para>Example shows how to use -PreCode to execute custom code before running actual command within Azure Function.</maml:para> <maml:para>Parameter -PreCode can be also used to install/import third party modules from the Internet.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> New-AzureFunctionCode -ScriptName LoremIpsum.ps1</dev:code> <dev:remarks> <maml:para>You can generate a Azure Function also for your custom scripts that have input parameters. Do not forget to copy to Azure also that custom script. Runner script will execute it in cloud with selected parameters.</maml:para> <maml:para>Parameter -PreCode can be also used to install/import third party modules from the Internet.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>GitHub repository</maml:linkText> <maml:uri>https://github.com/iricigor/EasyAzureFunction</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |