Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #11548 - Remove outdated information add links to how-to #11549

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 45 additions & 60 deletions reference/5.1/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 10/06/2023
ms.date: 11/25/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Enable-PSRemoting
Expand All @@ -15,25 +15,26 @@ Configures the computer to receive remote commands.
## SYNTAX

```
Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION

The `Enable-PSRemoting` cmdlet configures the computer to receive PowerShell remote commands that
are sent by using the WS-Management technology.

PowerShell remoting is enabled by default on Windows Server 2012. You can use `Enable-PSRemoting`
to enable PowerShell remoting on other supported versions of Windows and to re-enable remoting on
Windows Server 2012 if it becomes disabled.
PowerShell remoting is enabled by default on Windows Server 2012 and higher. You can use
`Enable-PSRemoting` to enable PowerShell remoting on other supported versions of Windows and to
re-enable remoting if it becomes disabled.

You have to run this command only one time on each computer that will receive commands. You do not
have to run it on computers that only send commands. Because the configuration starts listeners, it
is prudent to run it only where it is needed.
You need to run this command only one time on each computer that receive commands. You don't need to
run it on computers that only send commands. Because the configuration starts listeners, it's
prudent to run it only where it's needed.

Beginning in PowerShell 3.0, the `Enable-PSRemoting` cmdlet can enable PowerShell remoting
on client versions of Windows when the computer is on a public network. For more information, see
the description of the **SkipNetworkProfileCheck** parameter.
Beginning in PowerShell 3.0, the `Enable-PSRemoting` cmdlet can enable PowerShell remoting on client
versions of Windows when the computer is on a public network. For more information, see the
description of the **SkipNetworkProfileCheck** parameter.

The `Enable-PSRemoting` cmdlet performs the following operations:

Expand All @@ -44,21 +45,20 @@ The `Enable-PSRemoting` cmdlet performs the following operations:
- Creates a listener to accept requests on any IP address.
- Enables a firewall exception for WS-Management communications.
- Registers the **Microsoft.PowerShell** and **Microsoft.PowerShell.Workflow** session
configurations, if it they are not already registered.
- Registers the **Microsoft.PowerShell32** session configuration on 64-bit computers, if it is
configurations, if it they're not already registered.
- Registers the **Microsoft.PowerShell32** session configuration on 64-bit computers, if it's
not already registered.
- Enables all session configurations.
- Changes the security descriptor of all session configurations to allow remote access.
- Restarts the WinRM service to make the preceding changes effective.

To run this cmdlet on the Windows platform, start PowerShell by using the Run as administrator
option. This does not apply to Linux or MacOS versions of PowerShell.
option.

> [!CAUTION]
> On systems that have both PowerShell 3.0 and PowerShell 2.0, do not use
> PowerShell 2.0 to run the `Enable-PSRemoting` and `Disable-PSRemoting` cmdlets. The commands
> might appear to succeed, but the remoting is not configured correctly. Remote commands and later
> attempts to enable and disable remoting, are likely to fail.
For more information about using PowerShell remoting, see the following articles:

- [about_Remote_Requirements](about/about_Remote_Requirements.md)
- [about_Remote](about/about_Remote.md)

## EXAMPLES

Expand Down Expand Up @@ -109,7 +109,7 @@ domain networks. The command uses the **SkipNetworkProfileCheck** parameter to a
from public networks in the same local subnet. The command specifies the **Force** parameter to
suppress confirmation messages.

The **SkipNetworkProfileCheck** parameter does not affect server versions of the Windows operating
The **SkipNetworkProfileCheck** parameter doesn't affect server versions of the Windows operating
system, which allow remote access from public networks in the same local subnet by default.

The `Set-NetFirewallRule` cmdlet in the **NetSecurity** module adds a firewall rule that allows
Expand Down Expand Up @@ -141,13 +141,12 @@ Accept wildcard characters: False
### -SkipNetworkProfileCheck

Indicates that this cmdlet enables remoting on client versions of the Windows operating system 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.
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 does not affect server versions of the Windows operating system, which, by default,
have a local subnet firewall rule for public networks. If the local subnet firewall rule is
disabled on a server version, `Enable-PSRemoting` re-enables it, regardless of the value of this
parameter.
This parameter doesn't affect server versions of the Windows operating system, which, by default,
have a local subnet firewall rule for public networks. If the local subnet firewall rule is disabled
on a server version, `Enable-PSRemoting` re-enables it, regardless of the value of this parameter.

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.
Expand Down Expand Up @@ -184,8 +183,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if the cmdlet runs. The cmdlet isn't run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand All @@ -203,7 +201,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand All @@ -219,42 +218,28 @@ This cmdlet returns strings that describe its results.

## NOTES

In PowerShell 3.0, `Enable-PSRemoting` creates the following firewall exceptions for
WS-Management communications.

On server versions of the Windows operating system, `Enable-PSRemoting` creates firewall rules
for private and domain networks that allow remote access, and creates a firewall rule for public
networks that allows remote access only from computers in the same local subnet.

On client versions of the Windows operating system, `Enable-PSRemoting` in PowerShell 3.0 creates
firewall rules for private and domain networks that allow unrestricted remote access. To create a
firewall rule for public networks that allows remote access from the same local subnet, use the
**SkipNetworkProfileCheck** parameter.

On client or server versions of the Windows operating system, to create a firewall rule for public
networks that removes the local subnet restriction and allows remote access , use the
`Set-NetFirewallRule` cmdlet in the NetSecurity module to run the following command:
`Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -RemoteAddress Any`
Starting in PowerShell 3.0, `Enable-PSRemoting` enables all session configurations by setting the
value of the **Enabled** property of all session configurations to `$True`.

In PowerShell 2.0, `Enable-PSRemoting` creates the following firewall exceptions for WS-Management
communications.
- On server versions of the Windows operating system, `Enable-PSRemoting` creates firewall rules for
private and domain networks that allow remote access, and creates a firewall rule for public
networks that allows remote access only from computers in the same local subnet.

On server versions of the Windows operating system, it creates firewall rules for all networks that
allow remote access.
- On client versions of the Windows operating system, `Enable-PSRemoting` in PowerShell 3.0 creates
firewall rules for private and domain networks that allow unrestricted remote access. To create a
firewall rule for public networks that allows remote access from the same local subnet, use the
**SkipNetworkProfileCheck** parameter.

On client versions of the Windows operating system, `Enable-PSRemoting` in PowerShell 2.0
creates a firewall exception only for domain and private network locations. To minimize security
risks, `Enable-PSRemoting` does not create a firewall rule for public networks on client versions
of Windows. When the current network location is public, `Enable-PSRemoting` returns the following
message: Unable to check the status of the firewall.
- On client or server versions of the Windows operating system, to create a firewall rule for public
networks that removes the local subnet restriction and allows remote access , use the
`Set-NetFirewallRule` cmdlet in the NetSecurity module to run the following command:
`Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -RemoteAddress Any`

Starting in PowerShell 3.0, `Enable-PSRemoting` enables all session configurations by setting the
value of the **Enabled** property of all session configurations to `$True`.
`Enable-PSRemoting` enables all session configurations by setting the value of the **Enabled**
property of all session configurations to `$True`.

In PowerShell 2.0, `Enable-PSRemoting` removes the **Deny_All** setting from the security
descriptor of session configurations. In PowerShell 3.0, `Enable-PSRemoting` removes the
**Deny_All** and **Network_Deny_All** settings. This provides remote access to session
configurations that were reserved for local use.
`Enable-PSRemoting` removes the **Deny_All** and **Network_Deny_All** settings. This provides remote
access to session configurations that were reserved for local use.

## RELATED LINKS

Expand Down
18 changes: 11 additions & 7 deletions reference/7.4/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 10/06/2023
ms.date: 11/25/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Enable-PSRemoting
Expand Down Expand Up @@ -31,9 +31,9 @@ PowerShell remoting is enabled by default on Windows Server platforms. You can u
`Enable-PSRemoting` to enable PowerShell remoting on other supported versions of Windows and to
re-enable remoting if it becomes disabled.

You have to run this command only one time on each computer that will receive commands. You do not
have to run it on computers that only send commands. Because the configuration starts listeners to
accept remote connections, it is prudent to run it only where it is needed.
You need to run this command only one time on each computer that receive commands. You don't need to
run it on computers that only send commands. Because the configuration starts listeners, it's
prudent to run it only where it's needed.

Enabling PowerShell remoting on client versions of Windows when the computer is on a public network
is normally disallowed, but you can skip this restriction by using the **SkipNetworkProfileCheck**
Expand Down Expand Up @@ -81,6 +81,11 @@ option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the
> `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.

For more information about using PowerShell remoting, see the following articles:

- [about_Remote_Requirements](about/about_Remote_Requirements.md)
- [about_Remote](about/about_Remote.md)

## EXAMPLES

### Example 1: Configure a computer to receive remote commands
Expand Down Expand Up @@ -237,7 +242,7 @@ Indicates that this cmdlet enables remoting on client versions of the Windows op
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 does not affect server versions of the Windows operating system, which, by default,
This parameter doesn't affect server versions of the Windows operating system, which, by default,
have a local subnet firewall rule for public networks. If the local subnet firewall rule is disabled
on a server version, `Enable-PSRemoting` re-enables it, regardless of the value of this parameter.

Expand Down Expand Up @@ -276,8 +281,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if the cmdlet runs. The cmdlet isn't run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
18 changes: 11 additions & 7 deletions reference/7.5/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 10/06/2023
ms.date: 11/25/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Enable-PSRemoting
Expand Down Expand Up @@ -31,9 +31,9 @@ PowerShell remoting is enabled by default on Windows Server platforms. You can u
`Enable-PSRemoting` to enable PowerShell remoting on other supported versions of Windows and to
re-enable remoting if it becomes disabled.

You have to run this command only one time on each computer that will receive commands. You do not
have to run it on computers that only send commands. Because the configuration starts listeners to
accept remote connections, it is prudent to run it only where it is needed.
You need to run this command only one time on each computer that receive commands. You don't need to
run it on computers that only send commands. Because the configuration starts listeners, it's
prudent to run it only where it's needed.

Enabling PowerShell remoting on client versions of Windows when the computer is on a public network
is normally disallowed, but you can skip this restriction by using the **SkipNetworkProfileCheck**
Expand Down Expand Up @@ -81,6 +81,11 @@ option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the
> `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.

For more information about using PowerShell remoting, see the following articles:

- [about_Remote_Requirements](about/about_Remote_Requirements.md)
- [about_Remote](about/about_Remote.md)

## EXAMPLES

### Example 1: Configure a computer to receive remote commands
Expand Down Expand Up @@ -237,7 +242,7 @@ Indicates that this cmdlet enables remoting on client versions of the Windows op
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 does not affect server versions of the Windows operating system, which, by default,
This parameter doesn't affect server versions of the Windows operating system, which, by default,
have a local subnet firewall rule for public networks. If the local subnet firewall rule is disabled
on a server version, `Enable-PSRemoting` re-enables it, regardless of the value of this parameter.

Expand Down Expand Up @@ -276,8 +281,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if the cmdlet runs. The cmdlet isn't run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down