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
#Add the following to your PowerShell Profile to record history on exit. | |
#Windows PowerShell | |
#<userdirectory>\Documents\WindowsPowerShell\profile.ps1 | |
#PowerShell Core. | |
#<userdirectory>\Documents\PowerShell\profile.ps1 | |
$PWSHHistory = [System.IO.DirectoryInfo]"$Home\PWSHHistory" | |
$PWSHHistory.Create() | Out-Null |
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
<# | |
.NOTES | |
=========================================================================== | |
Created by: Marc Collins | |
Organization: Qlik | |
Filename: Set-GeneratePublisherEvidence.ps1 | |
=========================================================================== | |
.DESCRIPTION | |
Configure GeneratePublisherEvidence | |
https://community.qlik.com/t5/Knowledge/An-error-occurred-Failed-to-load-connection-error-message-in/ta-p/1714051 |
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
<# | |
.NOTES | |
=========================================================================== | |
Created on: 2021-10-27 10:09 AM | |
Created by: Marc Collins | |
Organization: Qlik | |
Title: Senior Principal Technical Architect | |
Email: [email protected] | |
Filename: NPrinting-CLI-Demo.ps1 | |
=========================================================================== |
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
<# | |
.NOTES | |
=========================================================================== | |
Created on: 2021-10-27 10:09 AM | |
Created by: Marc Collins | |
Organization: Qlik | |
Title: Senior Principal Technical Architect | |
Email: [email protected] | |
Filename: Qlik-CLI-Windows-CustomPropertyExtraction.ps1 | |
=========================================================================== |
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 statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
CREATE OR REPLACE FUNCTION public.validate_payload(IN payload JSON) RETURNS TEXT AS $$ | |
BEGIN | |
RETURN payload->>'XXXXX'; |
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
<# | |
.NOTES | |
=========================================================================== | |
Created on: 2021-11-23 9:36 AM | |
Created by: Marc Collins | |
Email: [email protected] | |
Organization: Qlik | |
Filename: Export_QV_LoadScript.ps1 | |
=========================================================================== | |
#> |
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
Function Get-ServicePath($Name) | |
{ | |
#Find the repository service | |
$WinService = Get-WmiObject win32_service | ?{ $_.Name -eq $Name } | select Name, DisplayName, State, PathName | |
[regex]$EXEPath = '(\\\\|\w:)(.+)(\..{3})' | |
if ($WinService.PathName -match $EXEPath) { [System.IO.FileInfo]$WinServicePath = $Matches[0] } | |
$WinService | Add-Member -MemberType NoteProperty -Name Path -Value $WinServicePath | |
$WinService | |
} |
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
<# | |
.NOTES | |
=========================================================================== | |
Created on: 2021-11-24 6:00 PM | |
Created by: Marc Collins | |
Title: Senior Principal Technical Architect | |
Organization: Qlik | |
Filename: QlikView-ADSync_Assign_Named_CALs.ps1 | |
=========================================================================== | |
#> |
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
function New-Credential{ | |
$counter = 0 | |
$more = $true | |
while($more){ | |
if($counter -ge 3){ | |
Write-Warning -Message ('Take a deep breath and perhaps a break. You have entered your password {0} times incorrectly' -f $counter) | |
Write-Warning -Message ('Please wait until {0} to try again to avoid risking locking yourself out.' -f $((Get-Date).AddMinutes(+15).ToShortTimeString())) | |
Start-Sleep -Seconds 30 | |
} |
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 regex patterns to look for | |
$http = [regex]::new("^.*?http.ssl=.*$") | |
$sslcert = [regex]::new("^.*?http.sslcert=.*$") | |
$sslkey = [regex]::new("^.*?http.sslkey=.*$") | |
#define the new values to put in the file | |
$newhttpline = "http.ssl=true" | |
$newsslcertLine = "http.sslcert=`${ProgramData}\NPrinting\certificates\qlik.pem" | |
$newsslkeyLine = "http.sslkey=`${ProgramData}\NPrinting\certificates\qlik.key" |