Start-QlikTask.ps1
function Start-QlikTask { <# .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 Start-QlikTask 'abc' Description of the example. #> <# Enable -Confirm and -WhatIf. #> [CmdletBinding(SupportsShouldProcess = $true)] param( [parameter(Mandatory=$true,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,Position=0)] [string]$id, [switch]$wait ) begin { } process { $path = "/qrs/task" If( $wait ) { $sync = "/synchronous" } If( $id -match($script:guid) ) { return Invoke-QlikPost "/qrs/task/$id/start$sync" } else { return Invoke-QlikPost "/qrs/task/start$($sync)?name=$id" } } end { } } if ($loadingModule) { Export-ModuleMember -Function 'Start-QlikTask' } |