Agent 权限配置

axing
2026-06-04 / 0 评论 / 5 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2026年06月04日,已超过11天没有更新,若内容或图片失效,请留言反馈。
New-ItemProperty `
  -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
  -Name "LocalAccountTokenFilterPolicy" `
  -Value 1 `
  -PropertyType DWord `
  -Force




Set-NetConnectionProfile -InterfaceIndex 17 -NetworkCategory Private

New-NetFirewallRule `
  -DisplayName "Allow WinRM 5985 From 192.168.1.0-24" `
  -Direction Inbound `
  -Protocol TCP `
  -LocalPort 5985 `
  -RemoteAddress 192.168.173.0/24 `
  -Action Allow `
  -Profile Any

New-NetFirewallRule `
  -DisplayName "Allow Agent 19100 From 192.168.1.0-24" `
  -Direction Inbound `
  -Protocol TCP `
  -LocalPort 19100 `
  -RemoteAddress 192.168.1.0/24 `
  -Action Allow `
  -Profile Any






Enable-PSRemoting -Force
Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true
Set-Item -Path WSMan:\localhost\Service\Auth\Negotiate -Value $true
Set-Item -Path WSMan:\localhost\Service\AllowUnencrypted -Value $true
Restart-Service WinRM
0

评论 (0)

取消