PS7 fixes

This commit is contained in:
2025-11-07 20:38:26 +01:00
parent a55ef3713f
commit ec27206453
2 changed files with 6 additions and 2 deletions

View File

@@ -25,7 +25,9 @@ Set-StrictMode -Version Latest
[string]$commonHelper = Join-Path -Path $PSScriptRoot -ChildPath 'Elysium.Common.ps1'
if (-not (Test-Path -LiteralPath $commonHelper)) { throw "Common helper not found at $commonHelper" }
. $commonHelper
Restart-WithWindowsPowerShellIfAvailable -BoundParameters $PSBoundParameters -UnboundArguments $MyInvocation.UnboundArguments
if ($PSVersionTable.PSEdition -ne 'Desktop') {
Restart-WithWindowsPowerShellIfAvailable -BoundParameters $PSBoundParameters -UnboundArguments $MyInvocation.UnboundArguments
}
$scriptRoot = $PSScriptRoot

View File

@@ -27,7 +27,9 @@ Set-StrictMode -Version Latest
[string]$commonHelper = Join-Path -Path $PSScriptRoot -ChildPath 'Elysium.Common.ps1'
if (-not (Test-Path -LiteralPath $commonHelper)) { throw "Common helper not found at $commonHelper" }
. $commonHelper
Restart-WithWindowsPowerShellIfAvailable -BoundParameters $PSBoundParameters -UnboundArguments $MyInvocation.UnboundArguments
if ($PSVersionTable.PSEdition -ne 'Desktop') {
Restart-WithWindowsPowerShellIfAvailable -BoundParameters $PSBoundParameters -UnboundArguments $MyInvocation.UnboundArguments
}
$VerbosePreference = "SilentlyContinue"