windows - WinRM 是否可以允许本地登录但不允许远程登录?

标签 windows powershell winrm

我正在尝试设置 Windows 服务器,即 WinRM 服务,以允许用户仅通过调用命令在本地进行访问,但不允许远程访问...

我尝试过编辑权限:

Set-PSSessionConfiguration Microsoft.PowerShell -ShowSecurityDescriptorUI

但这并没有真正帮助我,我还尝试了各种其他方法,研究了一天,但我似乎找不到一种方法来使其发挥作用。

所以我的问题是,有没有办法允许域用户仅在本地执行 Invoke-Command,但不允许远程访问 WinRM?

最佳答案

您要查找的设置是AccessMode .

Set-PSSessionConfiguration Microsoft.PowerShell -AccessMode Local

选项有禁用本地远程

关于windows - WinRM 是否可以允许本地登录但不允许远程登录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60802002/

相关文章:

.net - 没有 Windows Media Player 10+ 的 WPF 中的媒体支持?

powershell - 如何在 PowerShell 中继续脚本 block 的行?

powershell - 检查是否已配置 nuget 源

windows - Ansible:无法在 Windows 节点上执行 ping [SSL:CERTIFICATE_VERIFY_FAILED]

powershell - Windows 自定义不适用于 Terraform

c++ - 从 Linux OMI (omicli) 到 Windows WMI 的连接失败并出现 DMTF 相关错误

windows - Docker Desktop 4.16.3 无法启动,错误为 'provisioning docker WSL distros: terminating WSL distro\"docker-desktop"'

windows - 并行执行 shell 命令但限制作业(没有 Cygwin 的 Windows)

security - 如何避免在 PowerShell 脚本中保存用户名和密码

linux编译文件,windows运行