|
|
@ -19,7 +19,20 @@ function prompt {
|
|
|
|
|
|
|
|
|
|
|
|
'[{0}@{1} {2}]{3} ' -f $env:USERNAME.ToLower(),$env:COMPUTERNAME.ToLower(),$cwd,$delimiter
|
|
|
|
'[{0}@{1} {2}]{3} ' -f $env:USERNAME.ToLower(),$env:COMPUTERNAME.ToLower(),$cwd,$delimiter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function Get-BetterADUser {
|
|
|
|
|
|
|
|
param (
|
|
|
|
|
|
|
|
[Parameter(Mandatory=$true,
|
|
|
|
|
|
|
|
Position=0)]
|
|
|
|
|
|
|
|
[string]
|
|
|
|
|
|
|
|
$SearchTerm,
|
|
|
|
|
|
|
|
[string]
|
|
|
|
|
|
|
|
$Server = '{0}:3268' -f $env:USERDNSDOMAIN
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$filter = 'UserPrincipalName -like "*{0}*" -or Name -like "*{0}*"' -f $SearchTerm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get-ADUser -Filter $filter -Server $Server
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#check for old version
|
|
|
|
#check for old version
|
|
|
|