Qlik-Cli-Windows
Qlik-Cli-Windows copied to clipboard
Please add task name to Update-QlikReloadTask in resources/task.ps1
Very useful to rename task
function Update-QlikReloadTask {
[CmdletBinding()]
param (
[parameter(Mandatory = $true, ValueFromPipeline = $True, ValueFromPipelinebyPropertyName = $True, Position = 0)]
[string]$id,
[Bool]$Enabled,
[string]$Name,
[ValidateRange(1, 2147483647)]
[Int]$TaskSessionTimeout,
[ValidateRange(0, 20)]
[Int]$MaxRetries,
[string[]]$customProperties,
[string[]]$tags
)
PROCESS {
$task = Get-QlikReloadTask -Id $id -raw
If ( $psBoundParameters.ContainsKey("Enabled") ) { $task.enabled = $Enabled }
If ( $psBoundParameters.ContainsKey("Name") ) { $task.name = $Name }
If ( $psBoundParameters.ContainsKey("TaskSessionTimeout") ) { $task.taskSessionTimeout = $TaskSessionTimeout }
If ( $psBoundParameters.ContainsKey("MaxRetries") ) { $task.maxRetries = $MaxRetries }
if ($PSBoundParameters.ContainsKey("customProperties")) { $task.customProperties = @(GetCustomProperties $customProperties) }
if ($PSBoundParameters.ContainsKey("tags")) { $task.tags = @(GetTags $tags) }
$json = $task | ConvertTo-Json -Compress -Depth 10
return Invoke-QlikPut -path "/qrs/reloadtask/$id" -body $json
}
}