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
<# | |
.SYNOPSIS | |
Convert a file to a Base64 string | |
.DESCRIPTION | |
This is typically used for storing images (PNG/JPG) within a script | |
Code needs to be updated to cater for BMP and ICO | |
.LINK | |
https://gist.github.com/dancing-groot/44654c55b767ab8eed6e3edf1a005d30 | |
.NOTES | |
Version: 2024.11.29 |
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
If ($deploymentType -ine 'Uninstall') | |
{ | |
##*=============================================== | |
##* PRE-INSTALLATION | |
##*=============================================== | |
[String]$installPhase = 'Pre-Installation' | |
## <Perform Pre-Installation tasks here> | |
If (Test-Path -LiteralPath "C:\Program Files\Numecent\Application Jukebox Player\JukeboxPlayer.exe") | |
{ |
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
#region FUNCTIONS | |
function Install-AppWithEvergreen | |
{ | |
param | |
( | |
[string]$EvergreenAppName, | |
[scriptblock]$EvergreenArgs, | |
[string]$AppInstallerArgs | |
) |
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
<# | |
.SYNOPSIS | |
Test whether a Windows OS version is supported | |
.DESCRIPTION | |
Build a list based on the Windows OS, Edition and Build Number with a pre-defined 'end of life' date | |
to assess if the OS on this machine is still supported | |
.LINK | |
https://gist.github.com/dancing-groot/af52d6e2fea46704f67ffa324c58d2c2 | |
.NOTES | |
Version: 2025.04.17 |
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
[CmdletBinding()] | |
param() | |
#region FUNCTIONS | |
function New-SimpleLog | |
{ | |
<# | |
.SYNOPSIS | |
Write information to a log file and optionally to the console | |
.LINK |
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 Write-Timestamp | |
{ | |
<# | |
.SYNOPSIS | |
Provide visual feedback when running a script interactively | |
.LINK | |
https://gist.github.com/dancing-groot/1d606c697959b0c80782d10811dbaec5 | |
.NOTES | |
Version: 2022.03.10 | |
Author: @dancing-groot |
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
[CmdletBinding()] | |
param() | |
#region FUNCTIONS | |
function Write-Log | |
{ | |
<# | |
.SYNOPSIS | |
Write information to a log file, optionally in CMTrace format | |
.LINK |
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
#region FUNCTIONS | |
function Write-ProgressHelper | |
{ | |
<# | |
.SYNOPSIS | |
Generic function for using progress bars | |
.LINK | |
https://gist.github.com/dancing-groot/b6b381c48e98409b70cb84c810893b2e | |
.NOTES | |
Version: 2022.12.09 |
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 Invoke-ElevatedRights | |
{ | |
[CmdletBinding()] | |
param() | |
<# | |
.SYNOPSIS | |
Relaunch the script with elevated rights if required | |
.DESCRIPTION | |
Checks if the current user is running the script 'As Administrator' | |
If they are not, relaunch the script in a new process with elevated rights |
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
<# | |
.SYNOPSIS | |
A brief description of the function or script | |
.DESCRIPTION | |
A longer description | |
.NOTES | |
Version: yyyy.mm.dd | |
Author: Author Name | |
Info: Release Notes | |
#> |
NewerOlder