Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PS v7.4.1 breaks passing credentials to start-process #21073

Copy link
Copy link
@RaZz85

Description

@RaZz85
Issue body actions

Prerequisites

Steps to reproduce

Since updating to 7.4.1, it is no longer possible to pass credentials through to start-process. Running as admin makes no difference.

$credentials = get-credential
start-process -FilePath "C:\Windows\System32\mstsc.exe" -ArgumentList "/v:myrdpserver" -Credential $credential

Expected behavior

mstsc connects to myrdpserver with the provided credentials

Actual behavior

Start-Process: Access is denied.

Error details

Exception             :
    Type            : System.ComponentModel.Win32Exception
    NativeErrorCode : 5
    ErrorCode       : -2147467259
    TargetSite      :
        Name          : OpenProcess
        DeclaringType : System.Diagnostics.ProcessManager, System.Diagnostics.Process, Version=8.0.0.0, Culture=neutral
, PublicKeyToken=b03f5f7f11d50a3a
        MemberType    : Method
        Module        : System.Diagnostics.Process.dll
    Message         : Access is denied.
    Source          : System.Diagnostics.Process
    HResult         : -2147467259
    StackTrace      :
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetOrOpenProcessHandle()
   at System.Diagnostics.Process.get_Handle()
   at Microsoft.PowerShell.Commands.StartProcessCommand.BeginProcessing()
   at System.Management.Automation.Cmdlet.DoBeginProcessing()
   at System.Management.Automation.CommandProcessorBase.DoBegin()
CategoryInfo          : NotSpecified: (:) [Start-Process], Win32Exception
FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.StartProcessCommand
InvocationInfo        :
    MyCommand        : Start-Process
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 5
    Line             : start-process -FilePath  "C:\Windows\System32\mstsc.exe" -ArgumentList "/v:myrdpserver" -Credent
ial $credential
    Statement        : start-process -FilePath  "C:\Windows\System32\mstsc.exe" -ArgumentList "/v:myrdpserver" -Credent
ial $credential
    PositionMessage  : At line:1 char:1
                       + start-process -FilePath  "C:\Windows\System32\mstsc.exe" -ArgumentLis …
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : start-process
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.4-regressionRegression in 7.4Regression in 7.4In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueResolution-FixedThe issue is fixed.The issue is fixed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.