mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 22:27:28 +00:00
Update Invoke-WinUtilInstallPSProfile.ps1 (#4456)
* Update Invoke-WinUtilInstallPSProfile.ps1 * Update Invoke-WinUtilUninstallPSProfile.ps1 * Update Invoke-WinUtilInstallPSProfile.ps1 * Update Invoke-WinUtilUninstallPSProfile.ps1
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
function Invoke-WinUtilInstallPSProfile {
|
||||
|
||||
if (Test-Path $Profile) {
|
||||
Rename-Item $Profile -NewName ($Profile + '.bak')
|
||||
if (-not (Get-Command wt)) {
|
||||
Write-Host "Windows Terminal not found installing..."
|
||||
Install-WinUtilWinget
|
||||
winget install Microsoft.WindowsTerminal --source winget --silent
|
||||
}
|
||||
|
||||
Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"'
|
||||
if (-not (Get-Command pwsh)) {
|
||||
Write-Host "Powershell 7 not found installing..."
|
||||
Install-WinUtilWinget
|
||||
winget install Microsoft.PowerShell --source winget --silent
|
||||
}
|
||||
|
||||
wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user