PowerShell/profile.ps1

28 lines
781 B
PowerShell
Raw Normal View History

2023-06-17 21:11:38 +00:00
# Scripts in this $PROFILE folder are added to the PATH
2023-06-18 00:28:56 +00:00
$env:PATH += ";$(Split-Path -Parent $MyInvocation.MyCommand.Path)"
2023-06-17 21:29:09 +00:00
2023-06-17 21:11:38 +00:00
function prompt {
$prompt = "> "
2023-06-18 00:28:56 +00:00
If ((New-Object Security.Principal.WindowsPrincipal $(
[Security.Principal.WindowsIdentity]::GetCurrent()
).IsInRole(
[Security.Principal.WindowsBuiltinRole]::Administrator
)
)) {
2023-06-17 21:11:38 +00:00
$prompt = "Admin$prompt"
}
$prompt
}
2023-06-17 21:29:09 +00:00
function Install-Scoop {
2023-06-17 21:11:38 +00:00
# You can read the script before executing it here:
# https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1
Invoke-RestMethod get.scoop.sh | Invoke-Expression
# (un)install docs: https://github.com/ScoopInstaller/Install
}
2023-06-17 21:29:09 +00:00
function Install-BleachBit {
2023-06-17 21:11:38 +00:00
scoop bucket add extras
scoop install bleachbit
}