Skip to content

Commit 60af6af

Browse files
committed
Update notes on PSRP changes
1 parent 02e450c commit 60af6af

File tree

2 files changed

+61
-20
lines changed

2 files changed

+61
-20
lines changed

reference/7.6/Microsoft.PowerShell.Core/About/about_Remote_Requirements.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the system requirements and configuration requirements for running remote commands in PowerShell.
33
Locale: en-US
4-
ms.date: 07/03/2023
4+
ms.date: 08/18/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Remote_Requirements
@@ -49,7 +49,7 @@ computers must have the following:
4949
- Windows Remote Management 2.0
5050

5151
To be fully supported, you should be using WMF 5.1. For more information about
52-
WMF support, see [Windows Management Framework (WMF)][02].
52+
WMF support, see [Windows Management Framework (WMF)][03].
5353

5454
You can create a remote session between a computer running Windows PowerShell
5555
2.0 and one running a newer version of PowerShell. However, features that run
@@ -90,7 +90,7 @@ configurations with different security descriptors. Users can use the
9090
different endpoints.
9191

9292
For more information about session configurations, see
93-
[about_Session_Configurations][07].
93+
[about_Session_Configurations][08].
9494

9595
## Windows network locations
9696

@@ -190,7 +190,11 @@ Id Name ComputerName State ConfigurationName
190190
1 Session1 localhost Opened Microsoft.PowerShell
191191
```
192192

193-
If the command fails, see [about_Remote_Troubleshooting][04].
193+
If the command fails, see [about_Remote_Troubleshooting][05].
194+
195+
The PowerShell Remoting Protocol (PSRP) requires a secure transport layer for
196+
secure data transfer. For more information, see _Secure data transfer in
197+
PowerShell remoting_ section of [PowerShell security features][02].
194198

195199
## Understand policies
196200

@@ -204,21 +208,22 @@ policies on the remote computer are in effect.
204208

205209
## See also
206210

207-
- [about_Remote][06]
208-
- [about_Remote_Variables][05]
209-
- [about_PSSessions][03]
210-
- [Invoke-Command][09]
211-
- [Enter-PSSession][08]
212-
- [New-PSSession][10]
211+
- [about_Remote][07]
212+
- [about_Remote_Variables][06]
213+
- [about_PSSessions][04]
214+
- [Invoke-Command][10]
215+
- [Enter-PSSession][09]
216+
- [New-PSSession][11]
213217

214218
<!-- link references -->
215219
[01]: /powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core
216-
[02]: /powershell/scripting/windows-powershell/wmf/overview
217-
[03]: about_PSSessions.md
218-
[04]: about_Remote_Troubleshooting.md
219-
[05]: about_Remote_Variables.md
220-
[06]: about_Remote.md
221-
[07]: about_Session_Configurations.md
222-
[08]: xref:Microsoft.PowerShell.Core.Enter-PSSession
223-
[09]: xref:Microsoft.PowerShell.Core.Invoke-Command
224-
[10]: xref:Microsoft.PowerShell.Core.New-PSSession
220+
[02]: /powershell/scripting/security/security-features#secure-data-transfer-in-powershell-remoting
221+
[03]: /powershell/scripting/windows-powershell/wmf/overview
222+
[04]: about_PSSessions.md
223+
[05]: about_Remote_Troubleshooting.md
224+
[06]: about_Remote_Variables.md
225+
[07]: about_Remote.md
226+
[08]: about_Session_Configurations.md
227+
[09]: xref:Microsoft.PowerShell.Core.Enter-PSSession
228+
[10]: xref:Microsoft.PowerShell.Core.Invoke-Command
229+
[11]: xref:Microsoft.PowerShell.Core.New-PSSession

reference/docs-conceptual/security/security-features.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: PowerShell has several features designed to improve the security of your scripting environment.
3-
ms.date: 05/22/2025
3+
ms.date: 08/18/2025
44
title: PowerShell security features
55
---
66
# PowerShell security features
@@ -92,6 +92,42 @@ The creation and publishing of the SBOM is the first step to modernize Federal G
9292
cybersecurity and enhance software supply chain security. For more information about this
9393
initiative, see the blog post [Generating SBOMs with SPDX at Microsoft][11].
9494

95+
## Secure data transfer in PowerShell remoting
96+
97+
Prior to PowerShell v7.6-preview5, a `Session_Key` is used to encrypt a **SecureString** before
98+
sending it a PowerShell remote session. The PowerShell Remoting Protocol (PSRP) performs a
99+
key exchange between client and server when a `SecureString` object needs to be
100+
transferred. The exchange involves the following steps:
101+
102+
1. The client side generates a public/private key pair and sends the public key to the server.
103+
1. The server generates a session key for symmetric encryption.
104+
1. The server uses the public key to encrypt the session key and sends it to the client.
105+
1. Both the client and server use the new session key to encrypt a **SecureString** object.
106+
107+
The PowerShell Remoting Protocol (PSRP) uses the `RSAEncryptionPadding.Pkcs1` during the key
108+
exchange. The algorithm, is **NOT** secure, therefore, the key exchange doesn't provide any extra
109+
security. PSRP requires a secure transport layer for secure data transfer.
110+
111+
Beginning in PowerShell v7.6-preview5, the key exchange was deprecated. The version of PSRP was
112+
incremented to v2.4 and includes the following changes:
113+
114+
- The following PSRP messages are deprecated when both client and server are v2.4 or higher:
115+
116+
- PUBLIC_KEY
117+
- PUBLIC_KEY_REQUEST
118+
- ENCRYPTED_SESSION_KEY
119+
120+
- The encryption and decryption steps for `SecureString` are skipped when both client and server are
121+
v2.4 or higher.
122+
123+
- PSRP can use a named pipe remote sessions when both client and server are on the same machine.
124+
Since it's possible for a remote client to connect to named pipe and the data is no longer
125+
encrypted with a session key, the named pipe (used for `Enter-PSHostProcess`) rejects the remote
126+
client.
127+
128+
This change is backward compatible. For old clients or servers (v2.3 or lower), the key exchange is
129+
still used when needed.
130+
95131
## Security Servicing Criteria
96132

97133
PowerShell follows the [Microsoft Security Servicing Criteria for Windows][12]. Only security

0 commit comments

Comments
 (0)