PortValhalla/scripts/Windows/Config/PowerShell/Install.ps1
2023-07-27 05:57:31 +02:00

16 lines
502 B
PowerShell

#!/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;
$context.AddPowerShellProfileStatement(
@(
'# Profile Files',
'$profilePath = "$PSScriptRoot/profile.d/*.ps1";',
'if (Test-Path $profilePath) {',
' Get-Item $profilePath | ForEach-Object { . $_; };',
'}') -join ([System.Environment]::NewLine));