Last active
February 22, 2022 06:13
-
-
Save doctordns/4d0acab299b572ea7902431f8a182253 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample PowerShell 7 Profile File | |
# Copy the contents of this GIST to $Profile | |
# Meant to be a starting point. | |
# Greet the usser | |
"In Customiaations for: [$($Host.Name)]" | |
"For : [$(whomi)]" | |
"On ; [$(hostname)]" | |
# Set Me | |
$me = whoami | |
# Set Format enum limit | |
$FormatEnumerationLimit = 99 | |
# Set some command Defaults | |
$PSDefaultParameterValues = @{ | |
"*:autosize" = $true | |
'Receive-Job:keep' = $true | |
'*:Wrap' = $true | |
} | |
# Set home to C:\Foo for ~, then go there | |
New-Item C:\Foo -ItemType Directory -Force -EA 0 | Out-Null | |
$Provider = Get-PSProvider Filesystem | |
$Provider.Home = 'C:\Foo' | |
Set-Location ~ | |
Write-Host 'Set ~ to C:\Foo' | |
# Define a useful Get-HelpDetailed | |
Function Get-HelpDetailed { | |
Get-Help $args[0] -detailed | |
} #END GHD Function | |
# Set aliases | |
Set-Alias gh Get-Help | |
Set-Alias ghd Get-HelpDetailed | |
# Create Reskit Credential | |
$Urk = 'Reskit\Administrator' | |
$Prk = ConvertTo-SecureString 'Pa$$w0rd' -AsPlainText -Force | |
$Credrk = New-Object system.management.automation.PSCredential $Urk, $Prk | |
"`$Credrk created for $($credrk.username)" | |
Write-Host "Completed Customisations to $(hostname)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment