Copy-QlikApp.ps1
function Copy-QlikApp { <# .SYNOPSIS This function ... .DESCRIPTION A bit more description .PARAMETER FromPipeline Shows how to process input from the pipeline, remaining parameters or by named parameter. .EXAMPLE Copy-QlikApp 'abc' Description of the example. #> <# Enable -Confirm and -WhatIf. #> [CmdletBinding(SupportsShouldProcess = $true)] param( [parameter(Mandatory=$true,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,Position=0)] [string]$id, [parameter(ValueFromPipelinebyPropertyName=$True,Position=1)] [string]$name ) begin { } process { $path = "/qrs/app/$id/copy" If( $name ) { $path += "?name=$name" } return Invoke-QlikPost $path } end { } } if ($loadingModule) { Export-ModuleMember -Function 'Copy-QlikApp' } |