如何使用 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 次觀看

開啟您的 職業 生涯

完成課程,獲得認證

開始
廣告