This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$UserEmail = '[email protected]' | |
$Roles = .\qlik.exe role ls|ConvertFrom-Json | |
$UserObjs = .\qlik.exe user ls --filter "email eq \`"$($UserEmail)\`""|ConvertFrom-Json | |
$RoleTenantAdmin = $Roles|?{$_.name -eq "TenantAdmin"} | |
foreach($UserObj in $UserObjs){ | |
[System.Collections.Generic.List[string]]$RoleIDs = $UserObj.assignedRoles|%{$_.id} | |
if (!$RoleIDs.Contains($RoleTenantAdmin.id)){ | |
$RoleIDs.Add($RoleTenantAdmin.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#$PFXPath = '' | |
#$QlikClient = Get-PfxCertificate -FilePath $PFXPath | |
$QlikClient = Get-ChildItem Cert:\CurrentUser\My|?{$_.Subject -eq 'CN=QlikClient'} | |
Connect-QlikSense -Certificate $QlikClient -Username "Internal\sa_api" | |
$ArchivedLogsFolder = (Get-QSDataconnection -Filter "name eq 'ArchivedLogsFolder'") | Select-Object -First 1 | |
#$ResourceTypes = "AnalyticConnection", "App", "App.Object", "CompositeEvent", "ContentLibrary", "CustomPropertyDefinition", "DataConnection", "OdagLink", "OdagLinkUsage", "OdagRequest", "ReloadTask", "SchemaEvent", "Stream", "Tag" | |
$ResourceTypes = "Stream", "App", "ContentLibrary", "ReloadTask" | |
foreach ($ResourceType in $ResourceTypes) { | |
[system.io.fileinfo]$CSVFile = "$($ArchivedLogsFolder.Connectionstring)\Audit\$($ResourceType).csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$QlikClient = Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Subject -eq 'CN=QlikClient' } | |
Connect-QlikSense -TrustAllCertificates -Certificate $QlikClient -Username 'Internal\sa_api' | |
$output = [System.Collections.Generic.List[pscustomobject]]::new() | |
$QSApps = Get-QSApp | |
foreach ($App in $QSApps) | |
{ | |
$QSAppObjects = Get-QSAppObject -Filter "App.Id eq $($App.Id)" | |
$bookmarkCount = $($QSAppObjects | Where-Object { $_.ObjectType -eq 'bookmark' } | Measure-Object).Count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.NOTES | |
=========================================================================== | |
Created by: Marc Collins | |
Organization: Qlik Customer Success | |
Email: [email protected] | |
Filename: Qlik-Sense_UpdateSettingsIni.ps1 | |
=========================================================================== | |
#> | |
$ValueName = 'EnableParqutFormat' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-NPrinting | |
$Tasks = Get-NPTasks | |
$SelectedTasks = $Tasks |Out-GridView -OutputMode Multiple -Title "Select Tasks" | |
foreach($Task in $SelectedTasks){ | |
$TaskDetails = Invoke-NPRequest -method Get -NPE -Path "tasks/publish/$($Task.id)" | |
$TaskDetails.enabled = $(-not $TaskDetails.enabled) | |
Invoke-NPRequest -method Put -NPE "tasks/publish/$($Task.id)" -Data $TaskDetails | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(&(objectCategory=Person) | |
(| | |
(memberOf=CN=GroupName,OU=Department,OU=Security_Groups,DC=domain,DC=com) | |
(memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=Department,OU=Security_Groups,DC=domain,DC=com) | |
) | |
(!(userAccountControl:1.2.840.113556.1.4.803:=2)) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string]$TaskName | |
) | |
Connect-QlikSense -TrustAllCertificates | |
$Tasks = Get-QSReloadtask -Filter "Name eq '$($TaskName)'" | |
foreach($Task in $Tasks){ | |
Add-QSTask -Start -Id $Task.Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param | |
( | |
[Parameter()] | |
[System.IO.DirectoryInfo]$SourceSchemas, | |
[Switch]$Testing | |
) | |
if (-not $SourceSchemas.Exists) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install-Module QlikNPrinting-CLI -Scope CurrentUser | |
#https://github.com/QlikProfessionalServices/QlikNPrinting-CLI/releases | |
Connect-NPrinting -TrustAllCerts | |
$Connections = Invoke-NPRequest -Path connections | |
$Connections = $Connections |Out-GridView -Title "Select" -OutputMode Multiple | |
foreach($Connection in $Connections){ | |
$Connection | |
Invoke-NPRequest -Path "connections/$($Connection.id)/reload" -method post | |
} |
NewerOlder