Skip to content

Instantly share code, notes, and snippets.

@Nillth
Created May 2, 2023 22:45
Show Gist options
  • Save Nillth/d93576ce8a193e6c3ee653cf7e9fe68b to your computer and use it in GitHub Desktop.
Save Nillth/d93576ce8a193e6c3ee653cf7e9fe68b to your computer and use it in GitHub Desktop.
Connect-QlikSense -TrustAllCertificates #-Hostname "ifRequired" -VirtualProxy "ifRequired"
$Apps = Get-QSApp
$Proxy = Get-QSProxyservice -Local
$Hostname = $Proxy.ServerNodeConfiguration.HostName
$CollectedMetadata = New-Object System.Collections.Generic.List[PSCustomObject]
foreach($App In $Apps){
$URL = "https://$($Hostname)/api/v1/apps/$($App.Id)/data/metadata"
try{
$Metadata = Invoke-QSGet $URL -Raw
$CollectedMetadata.Add([PSCustomObject]@{App=$App;Metadata=$Metadata})
}catch{
$CollectedMetadata.Add([PSCustomObject]@{App=$App;Metadata=$null})
}
}
$CollectedMetadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment