Switch-QlikApp.ps1
function Switch-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 Switch-QlikApp 'abc' Description of the example. #> <# Enable -Confirm and -WhatIf. #> [CmdletBinding(SupportsShouldProcess = $true)] param( # ID of the app that is used to replace another app [parameter(Mandatory=$true,Position=0,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True)] [string]$id, # ID of the app to be replaced [parameter(Mandatory=$true,Position=1)] [string]$appId ) begin { } process { return Invoke-QlikPut "/qrs/app/$id/replace?app=$appId" } end { } } if ($loadingModule) { Export-ModuleMember -Function 'Switch-QlikApp' } |