当我们安装了一个Windows服务器核心系统后,没有图形界面的系统总是给我们一种非常完整的感觉,下面就让爱站技术频道小编带大家来了解Windows Remote Shell(WinRM)使用介绍吧!
在Server Core的服务器上,启用WinRM的命令行为:
WinRM QuickConfig
WinRM图1 开启WinRM示例
运行这个命令需要管理员权限运行,普通用户全提示权限不足。系统会有一个“y/n?”的提示选“Y”同意更改,然后就可以从客户端使用WinRS进行远程管理了。客户端命令格式如下:
winrs -r: <ServerCoreSystemName> <command><servercoresystemname><command></command></servercoresystemname>
WinRS图2 WinRS运行示例
image.png什么是WinRM?
WinRM = Windows Remote Management, Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems, from different vendors, to interoperate.
The WS-Management protocol specification provides a common way for systems to access and exchange management information across an IT infrastructure. WinRM and Intelligent Platform Management Interface (IPMI), along with the Event Collector are components of the Windows Hardware Management features.
参考官方文档:https://docs.microsoft.com/en-us/windows/desktop/winrm/portal
WinRM2.0默认端口5985(HTTP端口)或5986(HTTPS端口)。
如何开启WinRM?
以管理员权限运行PowerShell,然后输入以下命令:
Enable-PSRemoting cmdlet
image.png
以管理员权限运行下面的命令,查看winrm监听信息:
winrm e winrm/config/listener
网友评论