From c25e5300f0dea047cb7d19f1e2041b73553c6034 Mon Sep 17 00:00:00 2001 From: Kevin Wells <29664206+kawells@users.noreply.github.com> Date: Wed, 11 Mar 2026 09:23:57 -0700 Subject: [PATCH] Change invocation method for CTTcustom.ps1 The `&` (call operator) executes a script in a child scope, meaning any functions defined within `CTTcustom.ps1` are not exposed to your main PowerShell session. This change will ensure that `CTTcustom.ps1` is loaded into the current PowerShell session's scope, making any functions defined in it accessible. --- Microsoft.PowerShell_profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index da4512b8..71fa2fe4 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -755,7 +755,7 @@ Use '$($PSStyle.Foreground.Magenta)Show-Help$($PSStyle.Reset)' to display this h } if (Test-Path "$PSScriptRoot\CTTcustom.ps1") { - Invoke-Expression -Command "& `"$PSScriptRoot\CTTcustom.ps1`"" + . "$PSScriptRoot\CTTcustom.ps1" } Write-Host "$($PSStyle.Foreground.Yellow)Use 'Show-Help' to display help$($PSStyle.Reset)"