Skip to content

Commit

Permalink
Update remoting and language mode articles (#10490)
Browse files Browse the repository at this point in the history
* Add securing-remote-sessions

* Update about_language_modes and remoting articles

* Remove deleted article from TOC
  • Loading branch information
sdwheeler authored Oct 4, 2023
1 parent dce9939 commit 98761b0
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 141 deletions.
15 changes: 15 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@
"redirect_url": "/powershell/scripting/discover-powershell",
"source_path": "reference/docs-conceptual/learn/tutorials/01-discover-powershell.md"
},
{
"redirect_document_id": true,
"redirect_url": "/powershell/scripting/learn/remoting/wsman-remoting-in-powershell",
"source_path": "reference/docs-conceptual/learn/remoting/wsman-remoting-in-powershell-core.md"
},
{
"redirect_document_id": true,
"redirect_url": "/powershell/scripting/learn/remoting/ssh-remoting-in-powershell",
"source_path": "reference/docs-conceptual/learn/remoting/ssh-remoting-in-powershell-core.md"
},
{
"redirect_document_id": false,
"redirect_url": "/powershell/scripting/learn/remoting/wsman-remoting-in-powershell",
"source_path": "reference/docs-conceptual/learn/remoting/wsman-unsupported-for-nonwindows.md"
},
{
"redirect_document_id": false,
"redirect_url": "/powershell/utility-modules/platyps/create-help-using-platyps",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains language modes and their effect on PowerShell sessions.
Locale: en-US
ms.date: 06/07/2023
ms.date: 10/04/2023
no-loc: [FullLanguage, ConstrainedLanguage, RestrictedLanguage, NoLanguage]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -153,15 +153,15 @@ versions of Windows.

### RestrictedLanguage mode

The `RestrictedLanguage` mode was created for Windows RT, which is no longer
supported. This mode is also used to process modules manifests loaded by
`Import-Module`.

In `RestrictedLanguage` mode, users can run commands (cmdlets, functions, CIM
commands, and workflows), but can't use script blocks.
commands, and workflows), but can't use script blocks. This mode is also used
to process modules manifests loaded by `Import-Module`.

Beginning in PowerShell 7.2, the `New-Object` cmdlet is disabled in
`RestrictedLanguage` mode when system lockdown is configured.

By default, only the following variables are permitted in
`RestrictedLanguage` mode:
By default, only the following variables are permitted in `RestrictedLanguage`
mode:

- `$PSCulture`
- `$PSUICulture`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains language modes and their effect on PowerShell sessions.
Locale: en-US
ms.date: 06/07/2023
ms.date: 10/04/2023
no-loc: [FullLanguage, ConstrainedLanguage, RestrictedLanguage, NoLanguage]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -153,18 +153,15 @@ versions of Windows.

### RestrictedLanguage mode

The `RestrictedLanguage` mode was created for Windows RT, which is no longer
supported. This mode is also used to process modules manifests loaded by
`Import-Module`.

In `RestrictedLanguage` mode, users can run commands (cmdlets, functions, CIM
commands, and workflows), but can't use script blocks.
commands, and workflows), but can't use script blocks. This mode is also used
to process modules manifests loaded by `Import-Module`.

Beginning in PowerShell 7.2, the `New-Object` cmdlet is disabled in
`RestrictedLanguage` mode when system lockdown is configured.

By default, only the following variables are permitted in
`RestrictedLanguage` mode:
By default, only the following variables are permitted in `RestrictedLanguage`
mode:

- `$PSCulture`
- `$PSUICulture`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains language modes and their effect on PowerShell sessions.
Locale: en-US
ms.date: 06/07/2023
ms.date: 10/04/2023
no-loc: [FullLanguage, ConstrainedLanguage, RestrictedLanguage, NoLanguage]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -156,18 +156,15 @@ versions of Windows.

### RestrictedLanguage mode

The `RestrictedLanguage` mode was created for Windows RT, which is no longer
supported. This mode is also used to process modules manifests loaded by
`Import-Module`.

In `RestrictedLanguage` mode, users can run commands (cmdlets, functions, CIM
commands, and workflows), but can't use script blocks.
commands, and workflows), but can't use script blocks. This mode is also used
to process modules manifests loaded by `Import-Module`.

Beginning in PowerShell 7.2, the `New-Object` cmdlet is disabled in
`RestrictedLanguage` mode when system lockdown is configured.

By default, only the following variables are permitted in
`RestrictedLanguage` mode:
By default, only the following variables are permitted in `RestrictedLanguage`
mode:

- `$PSCulture`
- `$PSUICulture`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains language modes and their effect on PowerShell sessions.
Locale: en-US
ms.date: 06/07/2023
ms.date: 10/04/2023
no-loc: [FullLanguage, ConstrainedLanguage, RestrictedLanguage, NoLanguage]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -156,18 +156,15 @@ versions of Windows.

### RestrictedLanguage mode

The `RestrictedLanguage` mode was created for Windows RT, which is no longer
supported. This mode is also used to process modules manifests loaded by
`Import-Module`.

In `RestrictedLanguage` mode, users can run commands (cmdlets, functions, CIM
commands, and workflows), but can't use script blocks.
commands, and workflows), but can't use script blocks. This mode is also used
to process modules manifests loaded by `Import-Module`.

Beginning in PowerShell 7.2, the `New-Object` cmdlet is disabled in
`RestrictedLanguage` mode when system lockdown is configured.

By default, only the following variables are permitted in
`RestrictedLanguage` mode:
By default, only the following variables are permitted in `RestrictedLanguage`
mode:

- `$PSCulture`
- `$PSUICulture`
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
description: Remoting in PowerShell using WSMan
ms.date: 10/03/2023
title: Using WS-Management (WSMan) Remoting in PowerShell
---
# Using WS-Management (WSMan) Remoting in PowerShell

## Enabling PowerShell remoting

To enable PowerShell remoting run the `Enable-PSRemoting` cmdlet in an elevated PowerShell session.
Running `Enable-PSRemoting` configures a remoting endpoint for the specific installation version
that you are running the cmdlet in. For example, when you run `Enable-PSRemoting` while running
PowerShell 7.3, PowerShell creates a remoting endpoint runs PowerShell 7.3. If you run
`Enable-PSRemoting` while running PowerShell 7-preview, PowerShell creates a remoting endpoint that
runs PowerShell 7-preview. You can create multiple remoting endpoints for different versions of that
run side-by-side.

Running `Enable-PSRemoting` creates two endpoints for that version.

- One has a simple name corresponding to the PowerShell major version. that hosts the session. For
example, **PowerShell.7.3**.
- The other configuration name contains the full version number. For example, **PowerShell.7.3.7**.

You can connect to the latest version of PowerShell 7 host version using the simple name,
**PowerShell.7.3**. You can connect to a specific version of PowerShell using the longer,
version-specific name.

Use the **ConfigurationName** parameter with the `New-PSSession` and `Enter-PSSession` cmdlets to
connect to a named configuration.

## WSMan remoting isn't supported on non-Windows platforms

Since the release of PowerShell 6, support for remoting over WS-Management (WSMan) on non-Windows
platforms has only been available to a limited set of Linux distributions. All versions of those
distributions that supported WSMan are no longer supported by the Linux vendors that created them.

On non-Windows, WSMan relied on the [Open Management Infrastructure (OMI)][01] project, which no
longer supports PowerShell remoting. The OMI WSMan client is dependent on **OpenSSL 1.0**. Most
Linux distributions have moved to **OpenSSL 2.0**, which isn't backward-compatible. At this time,
there is no supported distribution that has the dependencies needed for the OMI WSMan client to
work.

The outdated libraries and supporting code have been removed for non-Windows platforms. WSMan-based
remoting is still supported between Windows systems. Remoting over SSH is supported for all
platforms. For more information, see [PowerShell remoting over SSH][03].

> [!NOTE]
> Users may be able to get WSMan remoting to work using the [PSWSMan][02] module. This module isn't
> supported or maintained by Microsoft.
## Further reading

- [Enable-PSRemoting][04]
- [Enter-PSSession][05]
- [New-PSSession][06]

<!-- link references -->
[01]: https://github.com/Microsoft/omi
[02]: https://www.powershellgallery.com/packages/PSWSMan
[03]: SSH-Remoting-in-PowerShell.md
[04]: xref:Microsoft.PowerShell.Core.Enable-PSRemoting
[05]: xref:Microsoft.PowerShell.Core.Enter-PSSession
[06]: xref:Microsoft.PowerShell.Core.New-PSSession

This file was deleted.

8 changes: 3 additions & 5 deletions reference/docs-conceptual/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,9 @@ items:
- name: Running remote commands
href: learn/remoting/running-remote-commands.md
- name: PowerShell remoting over SSH
href: learn/remoting/ssh-remoting-in-powershell-core.md
- name: WS-Management (WSMan) remoting in PowerShell Core
href: learn/remoting/wsman-remoting-in-powershell-core.md
- name: WSMan remoting is not supported on non-Windows platforms
href: learn/remoting/wsman-unsupported-for-nonwindows.md
href: learn/remoting/ssh-remoting-in-powershell.md
- name: WS-Management (WSMan) remoting in PowerShell
href: learn/remoting/wsman-remoting-in-powershell.md
- name: WinRM Security
href: learn/remoting/winrmsecurity.md
- name: Making the second hop in PowerShell Remoting
Expand Down

0 comments on commit 98761b0

Please sign in to comment.