Set WSManQuickConfig - PowerShell


Overview

The Set-WSManQuickConfig command is used to quickly configure Windows Remote Management (WinRM) settings on a local or remote computer. It allows administrators to easily enable or disable WinRM, set authentication modes, and configure certificate requirements. This command is particularly useful for quickly setting up WinRM for remote management tasks like PowerShell remoting and WMI.

Syntax

Set-WSManQuickConfig [-QuickConfig -Force] [-DisableLoopbackCheck]

Required Arguments

| Argument | Description |
|—|—|
| -QuickConfig | Specifies the desired quick configuration setting. Valid values include On, Off, Auto, and SSPI. |

Optional Arguments

| Argument | Description | Default |
|—|—|—|
| -Force | Suppresses confirmation prompts. | False |
| -DisableLoopbackCheck | Disables the loopback check, allowing WinRM to be used for remote management on the local computer. | False |

Options/Flags

| Flag | Description | Default |
|—|—|—|
| -On | Enables WinRM with default settings. | Off |
| -Off | Disables WinRM. | Off |
| -Auto | Enables WinRM and configures it for automatic startup. | Off |
| -SSPI | Enables WinRM and configures it for SSPI authentication. | Off |

Examples

Enable WinRM with Default Settings

Set-WSManQuickConfig -On

Disable WinRM

Set-WSManQuickConfig -Off

Enable WinRM and Allow Remote Management on Local Computer

Set-WSManQuickConfig -On -DisableLoopbackCheck

Enable WinRM and Configure SSPI Authentication

Set-WSManQuickConfig -SSPI

Common Issues

  • Permission Denied: Ensure the user has sufficient permissions to configure WinRM settings.
  • Loopback Check Failure: If the loopback check fails, manually create an exception in the firewall for WinRM traffic.
  • Invalid Configuration: Verify the specified quick configuration setting (-QuickConfig) is valid.

Integration

Set-WSManQuickConfig can be combined with other PowerShell commands for advanced management. For example, to enable WinRM and configure it for PowerShell remoting, use the following command:

Set-WSManQuickConfig -On
Enable-PSRemoting -Force