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() | |
# This works for PowerShell 5.1 but needs to be re-written for 7 | |
#region FUNCTIONS | |
function Initialize-EventLog | |
{ | |
<# | |
.SYNOPSIS |
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
<# | |
.SYNOPSIS | |
A brief description of the function or script | |
.DESCRIPTION | |
A longer description | |
.NOTES | |
Version: yyyy.mm.dd | |
Author: Author Name | |
Info: Release Notes | |
#> |
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
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 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 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 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 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-SimpleLog | |
{ | |
<# | |
.SYNOPSIS | |
Write information to a log file and optionally to the console | |
.LINK |
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
<# | |
.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: 2024.10.03 |
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
#region FUNCTIONS | |
function Install-AppWithEvergreen | |
{ | |
param | |
( | |
[string]$EvergreenAppName, | |
[scriptblock]$EvergreenArgs, | |
[string]$AppInstallerArgs | |
) |
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
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") | |
{ |