-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
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
- Open a powershell
- Use Get-Credential to capture a credential that has permissions to remote into a different machine
- Type: Enter-PsSession [remote machine] -Credentials [credentials]
Note
This only seems to occur during an interactive session. If I use Invoke-Command passing a computer name, or session variable, it executes without issue. e.g. The following works:
$creds = Get-Credential
$script = { Get-ChildItem }
Invoke-Command [Computer] -ScriptBlock $script -Credential $creds
Expected behavior
An interactive remote session is startedActual behavior
The terminal displays a NullReferenceException then crashesError details
Application: pwsh.exe
CoreCLR Version: 8.0.123.58001
.NET Version: 8.0.1
Description: The application requested process termination through System.Environment.FailFast.
Message: Object reference not set to an instance of an object.
Description: The process was terminated due to an unhandled exception.System.NullReferenceException: Object reference not set to an instance of an object.
at System.Management.Automation.Security.SystemPolicy.LogWDACAuditMessage(ExecutionContext context, String title, String message, String fqid, Boolean dropIntoDebugger)
at System.Management.Automation.Remoting.RunspaceRef.ParsePsCommandUsingScriptBlock(String line, Nullable`1 useLocalScope)
at System.Management.Automation.Remoting.RunspaceRef.CreatePipeline(String line, Boolean addToHistory, Boolean useNestedPipelines)
at Microsoft.PowerShell.Executor.ExecuteCommandAndGetResultAsString(String command, Exception& exceptionThrown)
at Microsoft.PowerShell.ConsoleHost.InputLoop.EvaluatePrompt()
at Microsoft.PowerShell.ConsoleHost.InputLoop.Run(Boolean inputLoopIsNested)
at Microsoft.PowerShell.ConsoleHost.InputLoop.RunNewInputLoop(ConsoleHost parent, Boolean isNested)
at Microsoft.PowerShell.ConsoleHost.EnterNestedPrompt()
at Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop(String initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs, Boolean staMode, String configurationName, String configurationFilePath)
at Microsoft.PowerShell.ConsoleHost.Run(CommandLineParameterParser cpp, Boolean isPrestartWarned)
at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText, Boolean issProvidedExternally)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)
Stack:
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])Environment data
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
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 issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer