How to disable basic authentication for windows server using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

Basic authentication is the insecure authentication for the windows. To disable the basic authentication on the windows server using PowerShell,

PS C:\> Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $false -Verbose

To disable the basic authentication on the remote windows servers using PowerShell, use the below command,

Invoke-Command -ComputerName TestMahchine1, TestMachine2 -
ScriptBlock {
   Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value
   $false -Verbose
}
raja
Published on 31-Aug-2021 10:10:47
Advertisements