mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
chore: Update generated dev docs (#4457)
This commit is contained in:
+11
-4
@@ -5,11 +5,18 @@ description: ""
|
|||||||
|
|
||||||
```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1}
|
```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1}
|
||||||
function Invoke-WinUtilInstallPSProfile {
|
function Invoke-WinUtilInstallPSProfile {
|
||||||
|
if (-not (Get-Command wt)) {
|
||||||
if (Test-Path $Profile) {
|
Write-Host "Windows Terminal not found installing..."
|
||||||
Rename-Item $Profile -NewName ($Profile + '.bak')
|
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"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
+5
-6
@@ -5,12 +5,11 @@ description: ""
|
|||||||
|
|
||||||
```powershell {filename="functions/private/Invoke-WinUtilUninstallPSProfile.ps1",linenos=inline,linenostart=1}
|
```powershell {filename="functions/private/Invoke-WinUtilUninstallPSProfile.ps1",linenos=inline,linenostart=1}
|
||||||
function Invoke-WinUtilUninstallPSProfile {
|
function Invoke-WinUtilUninstallPSProfile {
|
||||||
if (Test-Path ($Profile + '.bak')) {
|
|
||||||
Remove-Item $Profile
|
if (Test-Path ($Profile + ".bak")) {
|
||||||
Rename-Item ($Profile + '.bak') -NewName $Profile
|
Move-Item -Path ($Profile + ".bak") -Destination $Profile
|
||||||
}
|
} else {
|
||||||
else {
|
Remove-Item -Path $Profile
|
||||||
Remove-Item $Profile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green
|
Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green
|
||||||
|
|||||||
Reference in New Issue
Block a user