美文网首页Windows
Windows Server 2019 Core(1)-远程调用

Windows Server 2019 Core(1)-远程调用

作者: Rakutens | 来源:发表于2019-03-19 01:44 被阅读0次

系统装完后,没图形界面,不会用了对吧?....没关系,看完下面的就会了...

先登录远程服务器

#在命令行里运行
powershell 

#看一下ip地址,并记ip地址
ipconfig 

#确认WinRM是启动的
Get-Service WinRM | start-Service

#最后,你需要允许远程运行PowerShell
Enable-PSRemoting

然后回到本地

powershell

# 确认WinRM在你的电脑上是启动的
Get-Service WinRM | Start-Service
 
# 非域控环境下添加trusted host(如果是域控把"*"改为域名即可)
Set-Item WSMan:\localhost\Client\TrustedHosts "*" -Force
 
# 试一下连接远程服务器的powershell,记得在弹出窗里输入远程服务器的帐号密码
Enter-PSSession 远程ip -Credential (Get-Credential)

好了,现在已经可以使用远程服务器的powershell,但sconfig在远程是不能调用的哦....

相关文章

网友评论

    本文标题:Windows Server 2019 Core(1)-远程调用

    本文链接:https://www.haomeiwen.com/subject/wpdbmqtx.html