MicrosoftDocs / PowerShell-Docs

The official PowerShell documentation sources
https://learn.microsoft.com/powershell
Creative Commons Attribution 4.0 International
1.93k stars 1.55k forks source link

Document that `Enter-PSSession` cannot be called from scripts or via the CLI #11188

Closed mklement0 closed 2 weeks ago

mklement0 commented 2 weeks ago

Type of issue

Missing information

Feedback

https://github.com/PowerShell/PowerShell/issues/16350 and later duplicate https://github.com/PowerShell/PowerShell/issues/23949 demonstrate that these invocation scenarios do not work, resulting in confusing symptoms.

Unfortunately, the non-support of these invocation scenarios was declared to be by design (but the confusing bug was never fixed).

Please clearly document that Enter-PSSession is only supported when called from an interactive PowerShell session, directly from the prompt.

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enter-pssession?view=powershell-7.4

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Core/Enter-PSSession.md

Author

@sdwheeler

Document Id

2ae7e54b-c001-a85c-f35b-439f88904312