You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Passing script block to native application generate wrong value for -encodedCommand parameter #4966
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or more
When you pass ScriptBlock as parameter to native application, PowerShell activate so called MiniShell mode, where it encode script block and arguments as suitable for PowerShell subprocess call. When script block is empty, it generate incorrect command line.
It also looks like -encodedCommand parameter does not support empty string as its input.
Steps to reproduce
.\powershell -command {}
cmd /c echo -command {}
Expected behavior
-encodedCommand "" -inputFormat xml -outputFormat text
Actual behavior
Cannot process the command because the value specified with -EncodedCommand is not properly encoded. The value must be Base64 encoded.
#PowerShell help
-encodedCommand -inputFormat xml -outputFormat text
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.0.0-beta.7
PSEdition Core
GitCommitId v6.0.0-beta.7-73-g6522e08a425017ba7af4bc6bc7f4e657dbde8957
OS Microsoft Windows 10.0.15063
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 23, 2023
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or more
Activity
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.