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


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
}

Updated on: 31-Aug-2021

727 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements