Import-QlikObject.ps1
function Import-QlikObject { <# .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 Import-QlikObject 'abc' Description of the example. #> <# Enable -Confirm and -WhatIf. #> [CmdletBinding(SupportsShouldProcess = $true)] param( [parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] [PSObject[]]$object ) begin { } process { $object | foreach { $path = "/qrs/{0}" -F $_.schemaPath $json = $_ | ConvertTo-Json -Compress -Depth 10 Invoke-QlikPost $path $json } } end { } } if ($loadingModule) { Export-ModuleMember -Function 'Import-QlikObject' } |