shorten windowtitle of fsh to just the computername

master
lub 5 years ago
parent d88e136351
commit d31d612e78

@ -40,12 +40,10 @@ function Get-BetterADUser {
} }
function fsh { function fsh {
param ( param (
[string]$ComputerName, [string]$ComputerName
[pscredential]$Credential
) )
$usr = ($Credential.UserName -split '@')[0] $host.UI.RawUI.WindowTitle = $ComputerName
$host.UI.RawUI.WindowTitle = '{0}@{1}' -f $usr,$ComputerName
Enter-PSSession @PSBoundParameters @args Enter-PSSession @PSBoundParameters @args
} }

Loading…
Cancel
Save