From d31d612e78e890c2cd6e5f480dcca6b247c0df3a Mon Sep 17 00:00:00 2001 From: lub Date: Thu, 26 Sep 2019 14:37:35 +0200 Subject: [PATCH] shorten windowtitle of fsh to just the computername --- profile.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/profile.ps1 b/profile.ps1 index c9e2ade..ca9fd5a 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -40,12 +40,10 @@ function Get-BetterADUser { } function fsh { param ( - [string]$ComputerName, - [pscredential]$Credential + [string]$ComputerName ) - $usr = ($Credential.UserName -split '@')[0] - $host.UI.RawUI.WindowTitle = '{0}@{1}' -f $usr,$ComputerName + $host.UI.RawUI.WindowTitle = $ComputerName Enter-PSSession @PSBoundParameters @args }