【发布时间】:2019-03-05 08:14:54
【问题描述】:
我编写了一个脚本,允许使用 WinRM 连接到 Windows 服务器计算机,以便运行存在于 Windows 服务器计算机 PS_Block_Access_Internet_GPO.ps1 上的脚本,但尽管会话创建良好,但该脚本未执行。
除了脚本需要管理员权限才能执行,那么如何使用PowerShell为脚本提供所需的权限。
Enable-PSRemoting
Enter-PSSession -ComputerName Server.Admin.6NLG-AD
.\PS_Block_Internet_Access_GPO.ps1
【问题讨论】:
标签: powershell winrm