Add ability to load PowerShell profile files

This commit is contained in:
Manuel Thalmann 2023-07-27 01:59:03 +02:00
parent ada9df8e20
commit b44c8833b5
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,8 @@
#!/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('. "$PSScriptRoot/profile.d/*.ps1";');

View file

@ -18,6 +18,7 @@ function Invoke-WindowsInstallation([Context] $context)
. "$configPath/Explorer/Install.ps1" $context;
. "$configPath/OpenSSH/Install.ps1" $context;
. "$configPath/chocolatey/Install.ps1";
. "$configPath/PowerShell/Install.ps1" $context;
$context.RemoveDesktopIcon("*Microsoft Edge*");
$context.Set("InitialConfiguration", 1, "DWord");