CTT PowerShell Profile - Install
functions/private/Invoke-WinUtilInstallPSProfile.ps1
1function Invoke-WinUtilInstallPSProfile {
2 if (-not (Get-Command wt)) {
3 Write-Host "Windows Terminal not found installing..."
4 Install-WinUtilWinget
5 winget install Microsoft.WindowsTerminal --source winget --silent
6 }
7
8 if (-not (Get-Command pwsh)) {
9 Write-Host "Powershell 7 not found installing..."
10 Install-WinUtilWinget
11 winget install Microsoft.PowerShell --source winget --silent
12 }
13
14 wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"
15}