Last active
October 13, 2018 13:33
-
-
Save kkarakk/c994df685d982382dd2cf60af80b00b8 to your computer and use it in GitHub Desktop.
Customize Powershell
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
# Creates profile if doesn't exist then opens editor,wait a beat | |
if (!(Test-Path -Path $PROFILE)){ New-Item -Path $PROFILE -ItemType File } ; ise $PROFILE | |
************************************************************************************************ | |
************************************************************************************************ | |
# this goes inside the profile, save it and then open a new power shell window to see results | |
#create ascii art block | |
$block = @" | |
_ _ _ | |
| | (_)(_) _ | |
____ ___ ___ | | _____ ___ ____ _ _ _____ ____ _| |_ | |
/ ___) / _ \ / _ \ | | (____ | /___) / ___)| || | (____ | / ___)(_ _) | |
( (___ | |_| || |_| || | / ___ ||___ |( (___ | || | / ___ || | | |_ | |
\____) \___/ \___/ \_) \_____|(___/ \____)|_||_| \_____||_| \__) | |
"@ | |
#write block with green color | |
Write-Host $block -ForegroundColor Green | |
#write username@computername | |
Write-Host "$ENV:USERNAME@" -NoNewline -ForegroundColor Yellow | |
Write-Host "$ENV:COMPUTERNAME" -ForegroundColor Green | |
#open in a particular location, wherever you want | |
Set-Location 'C:\Users\SRI38' | |
#set window title | |
$host.ui.RawUI.WindowTitle = 'same rules apply' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment