-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
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.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
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
mklement0, LucaCamporotondo, lgaudreau, ChrisLynchHPE, awaters-meltin and 2 more
Metadata
Metadata
Assignees
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.