2023-07-26 23:59:03 +00:00
|
|
|
#!/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(
|
|
|
|
@(
|
2023-07-27 00:22:09 +00:00
|
|
|
'# 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));
|