Created
July 15, 2017 16:09
-
-
Save MatthewJDavis/da273783cb85c15fa6975c173e1ec7d3 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
$majorVersion = $Host.Version.Major.ToString() | |
$minorVersion = $Host.Version.Minor.ToString() | |
$version = "$majorVersion.$minorVersion" | |
#module Imports | |
Import-Module azureext | |
Import-Module AWSPowerShell | |
#aliases | |
New-Alias -Name sub -Value Select-AzureRmSubscription | |
New-Alias -Name add -Value Add-AzureRmAccount | |
Set-Location -Path C:\git | |
Write-Output "PowerShell version" $version | |
Get-Date | |
function Prompt { | |
$location = Get-Location | |
$identity = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$principal = [Security.Principal.WindowsPrincipal] $identity | |
if ($principal.IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
$Host.UI.RawUI.WindowTitle = "[ADMIN]: " + $location | |
} else { | |
$Host.UI.RawUI.WindowTitle = $location | |
} | |
"PS " + $env:username + "~" + (Get-Date -format t) + "> " | |
}#prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment