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

16 lines
502 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) {',
2023-07-27 03:57:31 +00:00
' Get-Item $profilePath | ForEach-Object { . $_; };',
2023-07-27 00:05:56 +00:00
'}') -join ([System.Environment]::NewLine));