次の方法で共有


Set-WSManQuickConfig

Configures the local computer for remote management.

構文

All

Set-WSManQuickConfig
    [-UseSSL]
    [-Force]
    [-SkipNetworkProfileCheck]
    [<CommonParameters>]

説明

This cmdlet is only available on the Windows platform.

The Set-WSManQuickConfig cmdlet configures the computer to receive PowerShell remote commands that are sent by using the Web Services for Management (WS-Management) technology.

Set-WSManQuickConfig performs the following actions:

  • Checks whether the WinRM service is running. If the WinRM service isn't running, the service is started.
  • Sets the WinRM service startup type to automatic.
  • Creates a listener to accept requests on any IP address. The default transport is HTTP.
  • Enables a firewall exception for WinRM traffic.

To run Set-WSManQuickConfig, start PowerShell with the Run as Administrator option.

Example 1: Enable remote management of the local computer over HTTP

This example sets the required configuration to enable remote management of the local computer. By default, this command creates a WS-Management listener on HTTP.

Set-WSManQuickConfig

Example 2: Enable remote management of the local computer over HTTPS

This example sets the required configuration to enable remote management of the local computer. The UseSSL parameter specifies that HTTPS is used to communicate with the computer.

Set-WSManQuickConfig -UseSSL

Note

HTTPS requires manual configuration. For more information, see the UseSSL parameter's description.

パラメーター

-Force

Forces the command to run without asking for user confirmation.

パラメーターのプロパティ

型:SwitchParameter
規定値:False
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-SkipNetworkProfileCheck

Configures Windows client versions for remoting when the computer is on a public network. This parameter enables a firewall rule for public networks that allows remote access only from computers in the same local subnet.

This parameter has no effect on server versions of Windows, that by default, have a local subnet firewall rule for public networks. If the local subnet firewall rule is disabled on the server version of Windows, Enable-PSRemoting re-enables it, regardless of this parameter's value.

To remove the local subnet restriction and enable remote access from all locations on public networks, use the Set-NetFirewallRule cmdlet in the NetSecurity module.

This parameter was introduced in PowerShell 3.0.

パラメーターのプロパティ

型:SwitchParameter
規定値:False
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-UseSSL

Specifies that the Secure Sockets Layer (SSL) protocol is used to establish a connection to the remote computer. By default, SSL isn't used.

WS-Management encrypts all the PowerShell content that is transmitted over the network. The UseSSL parameter lets you specify the additional protection of HTTPS instead of HTTP. If you use this parameter and SSL isn't available on the port that's used for the connection, the command fails.

HTTPS requires manual configuration of WinRM and firewall rules. For more information, see How To: Configure WINRM for HTTPS.

パラメーターのプロパティ

型:SwitchParameter
規定値:False
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

入力

None

You can't pipe objects to this cmdlet.

出力

String

This cmdlet returns a message as a String object describing the state of the configuration after the operation.