diff --git a/dotfiles/pwsh/powershell_profile.ps1 b/dotfiles/pwsh/powershell_profile.ps1 index b9e0ae5..096a09a 100644 --- a/dotfiles/pwsh/powershell_profile.ps1 +++ b/dotfiles/pwsh/powershell_profile.ps1 @@ -139,7 +139,7 @@ function Enable-SshAgent { .OUTPUTS no outputs #> - sudo Set-Service -Name ssh-agent -StartupType Manual && Start-Service ssh-agent + sudo run pwsh -c "Set-Service -Name ssh-agent -StartupType Manual && Start-Service ssh-agent" } # auto start ssh-agent and do ssh-add function Invoke-SshAdd {