Function Test-InstallerUseSymlinkStrategy { <# .SYNOPSIS Does the new installer use the symlink strategy? Set the value with [System.Environment]::SetEnvironmentVariable("Alkami.Installer.UseSymlink","true", "Machine") .DESCRIPTION This tests an environment variable and returns a boolean if the variable is set. .OUTPUTS [bool] if the machine is using Symlink strategy. #> [CmdletBinding()] [OutputType([System.Boolean])] Param() process { $loglead = Get-LogLeadName $useSymlinkValue = Get-EnvironmentVariable -Name "Alkami.Installer.UseSymlink" $useSymlink = $false if( -not ([string]::IsNullOrWhiteSpace($useSymlinkValue)) -and -not ([bool]::TryParse($useSymlinkValue, [ref]$useSymlink))) { Write-Warning "$logLead : Could not properly parse the value of the env variable [Alkami.Installer.UseSymlink] got [$useSymlinkValue]" } Write-Host "$logLead : Do we use the new installer pattern? [$useSymlink]" return $useSymlink } }