PowerShell profile. Requires at least version 7.3.4 or higher.
Note that you need administrator rights in order to create symbolic links on Windows,
unless you have turned on Developer Mode
in the settings app:
Instructions
git clone git@github.com:StefanGreve/profile.git
# recommended profile path: CurrentUserAllHosts
$PROFILE | Get-Member -Type NoteProperty | Format-List
# create a PowerShell directory if it doesn't exists already
New-Item "$HOME\Documents\PowerShell" -ItemType Directory -ErrorAction SilentlyContinue
# create a new symbolic link and dot-source profile.ps1
$ProfilePath = "$HOME\Documents\PowerShell\profile.ps1"
New-Item -Path $ProfilePath -ItemType SymbolicLink -Value $(Resolve-Path profile.ps1).Path
This profile is also part of the
configuration
repository.
Some additional features can be turned on by setting their respective environment variables:
-
PROFILE_ENABLE_DAILY_TRANSCRIPTS
: Set this value to1
to enable automatic -
transcript storing in
MyDocuments\Transcripts
(off by default) -
PROFILE_LOAD_CUSTOM_SCRIPTS
: Declare a single path to dot-source Powershell scripts from on profile launch. -
PROFILE_ENABLE_BRANCH_USERNAME
: Set this value to1
to display the active Git user name next to the branch name in the console prompt (off by default)
Content
Get-Battery
Get-Calendar
Set-PowerState
Set-EnvironmentVariable
Get-EnvironmentVariable
Get-WorldClock
Remove-EnvironmentVariable
Restart-GpgAgent
Set-WindowsTheme
*Set-MonitorBrightness
*Start-DailyTranscript
Start-ElevatedConsole
Start-Timer
Export-Branch
Get-Definition
Get-ExecutionTime
Install-Certificate
Stop-LocalServer
Test-Command
Copy-FilePath
Export-Icon
Get-FileCount
Get-FileSize
Get-FilePath
Get-MaxPathLength
New-Shortcut
*
Get-Salt
Get-StringHash
Get-RandomPassword
Get-XCKD
OS
Month
While this script attempts to be as lightweight as possible, a few externals are required to run some of the Cmdlets from this profile.
Third-Party Dependencies
Utility function to export SVGs as increasingly larger quadratic PNG files,
requires inkscape
for the actual image conversion.
Requires the bat
cargo for pretty terminal output.
Thin wrapper over Python's built-in calendar
module to pretty print a calendar.
Notice that this Cmdlet does not emit a PowerShell object. The behavior of this
Cmdlet is subject to future changes, see also: Issue #9.
Also note that some Cmdlets are Windows-exclusive and marked with an asterisk in the feature list.