How to enable the basic authentication for windows servers using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

Basic authentication is the insecure authentication for windows. Before enabling it make sure you comply with your organization policies. To enable the basic authentication for the windows servers using PowerShell, we can use the below command.

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

To enable the basic authentication for 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
   $true -Verbose
}
raja
Published on 31-Aug-2021 10:11:30
Advertisements