This file contains hidden or 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
<# | |
Run on the Central | |
#> | |
# Connect to Qlik Sense | |
# See https://github.com/ahaydon/Qlik-Cli/wiki/Establishing-a-connection for more connection options | |
Connect-Qlik | |
# Add the Node to the Cluster; store the password element of the response for the ZIP as $password | |
# nodePurpose: 0 (Production) / 1 (Development) / 2 (Both) | |
# engineEnabled, proxyEnabled, schedulerEnabled, $printingEnabled, $failoverCandidate as options | |
$password = New-QlikNode -hostname qlikserver2.domain.local -name qlikserver2 -nodePurpose 0 -engineEnabled -proxyEnabled |
This file contains hidden or 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
# List all QVConnect processes | |
# Select the subset which have been were spawned 3 hours prior | |
# Stop that subset | |
Get-Process QvConnect64 | Where StartTime -lt (Get-Date).AddMinutes(-180) | Stop-Process -Force |
This file contains hidden or 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
Get-Process QVConnect | select name, starttime |
This file contains hidden or 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
SELECT * FROM pg_stat_activity"; |
This file contains hidden or 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
# Set the postgres user password | |
$env:PGPASSWORD = 'password'; | |
# Get the date and format into YYYY-MM-DD format | |
$date = Get-Date -format "yyyy-MM-dd" | |
# Test if there is a QSR directory | |
Set-Location / | |
if (Test-Path C:\QSR) { | |
Write-Host "C:\QSR already exists." -ForegroundColor Green | |
} else { | |
Write-Host "Creating QSR directory for PostgreSQL backup" -ForegroundColor Green |
This file contains hidden or 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
Get-QlikRule | ?{$_.type -like 'custom'} | ForEach-Object { $_ | ConvertTo-Json | Out-File ("C:\Temp\$( ($_.name -replace '(-|#|\||"|,|/|:|â|€|™|\?)', '' )).json") } |
This file contains hidden or 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
#-------------------------------------------------------------------------------------------------------------------------------- | |
# | |
# Script Name: qlik_sense_log_scrape.ps1 | |
# Description: get Sense + Windows logs for a given date | |
# Dependency: N/A | |
# | |
# Version Date Author Change Notes | |
# 0.1 2018-02-14 Levi Turner Initial Version | |
# | |
#-------------------------------------------------------------------------------------------------------------------------------- |
This file contains hidden or 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
#----------------------------------------------------------------------- | |
# | |
# Script Name: qlik_sense_service-stop.ps1 | |
# Description: This will stop Qlik Sense Services | |
# Version Date Author Change Notes | |
# 0.1 2017-12-20 Levi Turner Initial Version | |
#----------------------------------------------------------------------- | |
Get-Service QlikSenseSchedulerService -ComputerName localhost | Stop-Service | |
Get-Service QlikSenseEngineService -ComputerName localhost | Stop-Service |
This file contains hidden or 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
#----------------------------------------------------------------------- | |
# | |
# Script Name: qlik_sense_service-start.ps1 | |
# Description: This will start Qlik Sense Services | |
# Version Date Author Change Notes | |
# 0.1 2017-12-20 Levi Turner Initial Version | |
#----------------------------------------------------------------------- | |
Get-Service QlikSenseRepositoryDatabase -ComputerName localhost | Start-Service | |
Get-Service QlikLoggingService -ComputerName localhost | Start-Service |
This file contains hidden or 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
@ECHO OFF | |
net stop "Qlik Sense Engine Service" | |
net stop "Qlik Sense Printing Service" | |
net stop "Qlik Logging Service" | |
net stop "Qlik Sense Proxy Service" | |
net stop "Qlik Sense Scheduler Service" | |
net stop "Qlik Sense Repository Service" | |
net stop "Qlik Sense Service Dispatcher" | |
net stop "Qlik Sense Repository Database" | |
TIMEOUT 10 |