|
|
@ -38,7 +38,17 @@ function Get-BetterADUser {
|
|
|
|
|
|
|
|
|
|
|
|
Get-ADUser -Filter $filter -Server $Server
|
|
|
|
Get-ADUser -Filter $filter -Server $Server
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function fsh {
|
|
|
|
|
|
|
|
param (
|
|
|
|
|
|
|
|
[string]$ComputerName,
|
|
|
|
|
|
|
|
[pscredential]$Credential
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$usr = ($Credential.UserName -split '@')[0]
|
|
|
|
|
|
|
|
$host.UI.RawUI.WindowTitle = '{0}@{1}' -f $usr,$ComputerName
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enter-PSSession @PSBoundParameters @args
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#check for old version
|
|
|
|
#check for old version
|
|
|
|
if($PSVersionTable.PSVersion.Major -le 5){
|
|
|
|
if($PSVersionTable.PSVersion.Major -le 5){
|
|
|
|