-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
In-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 product
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
Get-Service | Where-Object {$_.Status -eq "running"} | Format-Table -AutoSize -Property Name,DisplayNameExpected behavior
Non-empty fields dedicated to error messages.Actual behavior
Empty fields dedicated to error messages. As part of the output:
Get-Service: Service 'McpManagementService (McpManagementService)' cannot be queried due to the following error:
Get-Service: Service 'NPSMSvc_329b6 (NPSMSvc_329b6)' cannot be queried due to the following error:Error details
Exception :
Type : Microsoft.PowerShell.Commands.ServiceCommandException
ServiceName : NPSMSvc_329b6
Message : Service 'NPSMSvc_329b6 (NPSMSvc_329b6)' cannot be queried due to the following error:
HResult : -2146233087
TargetObject : System.ServiceProcess.ServiceController
CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Get-Ser
vice], ServiceCommandException
FullyQualifiedErrorId : CouldNotGetServiceInfo,Microsoft.PowerShell.Commands.GetServiceCommand
InvocationInfo :
MyCommand : Get-Service
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 1
Line : Get-Service | Where-Object {$_.Status -eq "running"} | Format-Table -AutoSize -Property
Name,DisplayName
Statement : Get-Service
PositionMessage : At line:1 char:1
+ Get-Service | Where-Object {$_.Status -eq "running"} | Format-Table - …
+ ~~~~~~~~~~~
InvocationName : Get-Service
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :Environment data
PSVersion 7.4.0-preview.5
PSEdition Core
GitCommitId 7.4.0-preview.5
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
_
Metadata
Metadata
Assignees
Labels
In-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 product