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
# Creates a valid certificate for data encryption which expires 1 day from current time | |
New-SelfSignedCertificate -Subject "QlikSenseDataEncrytion" ` | |
-KeyAlgorithm RSA ` | |
-KeyLength 4096 ` | |
-Provider "Microsoft Software Key Storage Provider" ` | |
-KeyExportPolicy ExportableEncrypted ` | |
-CertStoreLocation "cert:\CurrentUser\My" ` | |
-NotAfter (Get-Date).AddDays(1) |
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
# Change the location to the VirtualBox installdir; default is used here | |
Set-Location "C:\Program Files\Oracle\VirtualBox" | |
# Get a list of VMs | |
.\VBoxManage.exe list vms | |
# Determine the off-set required; modify date as needed | |
([datetime]"07/01/2019" - [datetime]::Now) |
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
cd /d D:\dbgen\dbgen\Debug | |
dbgen -vf -s 1 |
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
# Adjust CSP | |
openssl pkcs12 -in cert.pfx -out cert.pem -password pass:<password> -passin pass:<password> | |
openssl pkcs12 -export -in cert.pem -out cert-new.pfx -CSP "Microsoft Enhanced RSA and AES Cryptographic Provider" | |
certutil -dump cert-new.pfx | |
# Rename file | |
rename cert.pfx cert-original.pfx | |
rename cert-new.pfx cert.pfx | |
# Strip Password |
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: qs-qrs-migrate_all_apps.ps1 | |
# Description: Manually migrate all apps (useful post upgrade if the automatic upgrade isn't done | |
# Dependency: Run as service account (or other account authorized to make QRS API calls) | |
# | |
# Version Date Author Change Notes | |
# 0.1 2019-04-01 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
Get-ChildItem -Recurse -Filter *.json | | |
ForEach-Object { | |
Write-Host $_.Name | |
Write-Host $_.FullName | |
$jsondata = Get-Content -Raw -Path $_.FullName | ConvertFrom-Json | |
$jsondata.scenario | Where{$_.Label -eq 'SELECT in Benchmark'} | ForEach{$_.Type = 'SelectString'} | |
$jsondata.scenario | Where{$_.Label -eq 'SELECT in Benchmark'} | ForEach{$_.StringSelection = 'Under 65 Population'} | |
$jsondata | ConvertTo-Json -depth 100 | Out-File -LiteralPath $_.FullName | |
} |
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
$hdrs = @{} | |
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123") | |
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api") | |
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'} | |
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg | |
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data))) | |
$qpsalive = 0 | |
Do { |
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
<# | |
From: https://www.reddit.com/r/PowerShell/comments/8u0xl6/install_chrome_firefox_plugins_without_user/e1cli8p/ | |
#> | |
$regLocation = 'Software\Policies\Google\Chrome\ExtensionInstallForcelist' | |
# Each extension if you want to force install more than 1 extension needs its own key # | |
$regKey = '1' | |
# 'mpabchoaimgbdbbjjieoaeiibojelbhm' is the Extension ID, easiest way to get this is from the URL of the extension | |
$regData = 'mpabchoaimgbdbbjjieoaeiibojelbhm;https://clients2.google.com/service/update2/crx' | |
New-Item -Path "HKLM:\$regLocation" -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
'd60df0b7-7dd1-4e80-8555-fd1d5af2bf9b' | % { New-Item -Path c:\temp -Name "$_" -Value (Get-Date).toString()-ItemType file} |