如何远程运行PowerShell命令?

首先, 被remote运行PowerShell的windows必须已经join了domain. 其次, 该Windows的PowerShell必须开启对remote command的接受, 运行下面的命令来做到:

enable-psremoting
 

示例如下:

image

好了, 可以到另一台机器上去执行命令玩玩看啦. 运行Enter-PSSession命令来执行远程命令.

Enter-PSSession

示例如下:

image

参考资料

======================

Running Remote Commands

https://technet.microsoft.com/en-us/library/dd819505.aspx

about_Remote_Requirements

https://technet.microsoft.com/en-us/library/dd315349.aspx

原文地址:https://www.cnblogs.com/awpatp/p/4549239.html