Snippets/Parameter/Param block (simple).snippets.ps1xml
<?xml version='1.0' encoding='utf-8' ?>
<Snippets xmlns='http://schemas.microsoft.com/PowerShell/Snippets'> <Snippet Version='1.0.0'> <Header> <Title>Param block (simple)</Title> <Description>adds simple param() block</Description> <Shortcut>par</Shortcut> <Keywords>Parameter,ScriptBlock</Keywords> <Author>Tobias</Author> <DifficultyLevel>1</DifficultyLevel> <Example>False</Example> <SnippetTypes> <SnippetType>Expansion</SnippetType> </SnippetTypes> <Requirements> <MinimumPowerShellVersion>1</MinimumPowerShellVersion> <RequiredModules></RequiredModules> <AdminPrivileges>False</AdminPrivileges> <ProcessorArchitecture>x86,x64</ProcessorArchitecture> </Requirements> </Header> <Declarations> <Literal> <ID><![CDATA[57;10;0]]></ID> <Default></Default> <ToolTip><![CDATA[Parameter 1 name]]></ToolTip> <ToolTipStatusbar><![CDATA[Parameter 1 name]]></ToolTipStatusbar> </Literal> <Literal> <ID><![CDATA[120;10;0]]></ID> <Default></Default> <ToolTip><![CDATA[Parameter 2 name]]></ToolTip> <ToolTipStatusbar><![CDATA[Parameter 2 name]]></ToolTipStatusbar> </Literal> </Declarations> <Code> <Script Language='PowerShell' CaretOffset='135'> <![CDATA[param ( [String] [Parameter(Mandatory=$true)] $Parameter1, [string] [Parameter(Mandatory=$false)] $Parameter2 ) ]]> </Script> </Code> </Snippet> </Snippets> |