Add a 'who' function for Windows
This commit is contained in:
parent
693c778cf5
commit
e2db055204
1 changed files with 7 additions and 1 deletions
|
@ -54,7 +54,7 @@ function ADUserInfo {
|
|||
Get-ADUser -Properties $ADPropertiesGet -Identity $User | Select-Object -Property $ADPropertiesPrint
|
||||
}
|
||||
|
||||
Function mkcd {
|
||||
function mkcd {
|
||||
param (
|
||||
[Parameter(Mandatory)]
|
||||
[string]$Path
|
||||
|
@ -63,6 +63,12 @@ Function mkcd {
|
|||
Set-Location -Path $Path
|
||||
}
|
||||
|
||||
if ($IsWindows -or ($env:OS -eq "Windows_NT")) {
|
||||
function who {
|
||||
& "$env:SystemRoot\System32\query.exe" user
|
||||
}
|
||||
}
|
||||
|
||||
Set-PSReadlineOption -BellStyle None
|
||||
Set-PSReadlineOption -EditMode Emacs
|
||||
Set-PSReadlineKeyHandler -Key Tab -Function Complete
|
||||
|
|
Loading…
Reference in a new issue