Snippets/Function/cmdlet (advanced function) - complete.snippets.ps1xml

<?xml version='1.0' encoding='utf-8' ?>
    <Snippets xmlns='http://schemas.microsoft.com/PowerShell/Snippets'>
        <Snippet Version='1.0.0'>
            <Header>
                <Title>cmdlet (advanced function) - complete</Title>
                <Description></Description>
                <Shortcut>cmdlet</Shortcut>
                <Keywords>ScriptBlock,Editor</Keywords>
                <Author>Tobias</Author>
                <DifficultyLevel>5</DifficultyLevel>
                <Example>False</Example>
                <SnippetTypes>
                    <SnippetType>Expansion</SnippetType>
                </SnippetTypes>
                <Requirements>
                    <MinimumPowerShellVersion>1</MinimumPowerShellVersion>
                    <RequiredModules></RequiredModules>
                    <AdminPrivileges>False</AdminPrivileges>
                    <ProcessorArchitecture>x86,x64</ProcessorArchitecture>
                </Requirements>
            </Header>
 
            <Code>
                <Script Language='PowerShell' CaretOffset='1968'>
                    <![CDATA[<#
.Synopsis
   Short description
.DESCRIPTION
   Long description
.EXAMPLE
   Example of how to use this cmdlet
.EXAMPLE
   Another example of how to use this cmdlet
.INPUTS
   Inputs to this cmdlet (if any)
.OUTPUTS
   Output from this cmdlet (if any)
.NOTES
   General notes
.COMPONENT
   The component this cmdlet belongs to
.ROLE
   The role this cmdlet belongs to
.FUNCTIONALITY
   The functionality that best describes this cmdlet
#>
function Verb-Noun
{
    [CmdletBinding(DefaultParameterSetName='Parameter Set 1',
                  SupportsShouldProcess=$true,
                  PositionalBinding=$false,
                  HelpUri = 'http://www.microsoft.com/',
                  ConfirmImpact='Medium')]
    [Alias()]
    [OutputType([String])]
    Param
    (
        # Param1 help description
        [Parameter(Mandatory=$true,
                   ValueFromPipeline=$true,
                   ValueFromPipelineByPropertyName=$true,
                   ValueFromRemainingArguments=$false,
                   Position=0,
                   ParameterSetName='Parameter Set 1')]
        [ValidateNotNull()]
        [ValidateNotNullOrEmpty()]
        [ValidateCount(0,5)]
        [ValidateSet('sun', 'moon', 'earth')]
        [Alias('p1')]
        $Param1,
 
        # Param2 help description
        [Parameter(ParameterSetName='Parameter Set 1')]
        [AllowNull()]
        [AllowEmptyCollection()]
        [AllowEmptyString()]
        [ValidateScript({$true})]
        [ValidateRange(0,5)]
        [int]
        $Param2,
 
        # Param3 help description
        [Parameter(ParameterSetName='Another Parameter Set')]
        [ValidatePattern('[a-z]*')]
        [ValidateLength(0,15)]
        [String]
        $Param3
    )
 
    Begin
    {
    }
    Process
    {
        if ($pscmdlet.ShouldProcess('Target', 'Operation'))
        {
        }
    }
    End
    {
    }
}
]]>
                </Script>
            </Code>
 
    </Snippet>
</Snippets>