PortValhalla/scripts/Windows/Config/PowerShell/Install.ps1

16 lines
468 B
PowerShell
Raw Normal View History

#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
Write-Host "Configuring PowerShell";
Write-Information "Allow addition of any number of profile files";
[Context] $context = $context;
2023-07-27 00:05:56 +00:00
$context.AddPowerShellProfileStatement(
@(
'# Profile Files',
2023-07-27 00:05:56 +00:00
'$profilePath = "$PSScriptRoot/profile.d/*.ps1";',
'if (Test-Path $profilePath) {',
' . $profilePath;',
'}') -join ([System.Environment]::NewLine));