##查看标题
$host.ui.RawUI.WindowTitle
##试探权限
Enable-PSRemoting -Force
##返回Boolean值
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("administrator")
##查看标题
$host.ui.RawUI.WindowTitle
##试探权限
Enable-PSRemoting -Force
##返回Boolean值
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("administrator")
相关文章: