Get-Host 帮助信息

如下说明是翻译 PowerShell : help Get-Host 产生的帮助信息 .
译者 : Edengundam( 马涛 )
 
Get-Host
 
大纲
取得当前控制台宿主对象的引用. 显示Windows Powershell默认的版本和区域信息.
 
语法
Get-Host [<CommonParameters>]
 
详细描述
取得当前控制台宿主对象的引用. 显示Windows Powershell默认的版本和区域信息. 此cmdlet可以取得用于操作控制台用户接口的对象.
 
参数
 
< 公共参数 >
此命令支持公共参数 : -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. 更多信息 , 输入 , "get-help about_commonparameters".
 
输入类型
None
 
返回类型
Object
 
注意
 
更多信息, 输入"Get-Help Get-Host -detailed".需要技术信息, 输入 "Get-Help Get-Host -full".
 
如果需要为该命令提供多个参数, 请使用逗号进行分隔. 例如, "<parameter-name> <value1>, <value2>".
 
自动变量$host包含了到当前控制台宿主对象的引用.
 
1
 
C:/PS>get-host
 
此命令显示当前shell的相关信息.
 
2
 
C:/PS>$h = get-host
$win = $h.ui.rawui.windowsize
$win.height = 10
$win.width  = 10
$h.ui.rawui.set_windowsize($win)
 
此命令将会调整Windows PowerShell窗口大小为10像素乘10像素.
 
相关链接
Read-Host
Out-Host
Write-Host
 

你可能感兴趣的:(Get-Host 帮助信息)