如何使用 PowerShell 获取 Windows 身份验证设置?


要使用 PowerShell 获取 Windows 服务器身份验证设置,我们可以在本地服务器上使用以下命令。

PS C:\> Get-ChildItem WSMan:\localhost\Service\Auth | Select name, value

输出

Name              Value
----              -----
Basic             false
Kerberos          true
Negotiate         true
Certificate       false
CredSSP           false
CbtHardeningLevel Relaxed

要在远程服务器上获取相同设置,请使用以下命令。

Invoke-Command -ComputerName TestMahchine1, TestMachine2 -
ScriptBlock {
   Get-ChildItem WSMan:\localhost\Service\Auth
} | Select PSComputerName, Name, Auth

更新于:31-8-2021

856 次观看

开启您的 职业 生涯

完成课程,获得认证

开始
广告
© . All rights reserved.