-
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 productNeeds-InvestigationThe behavior reported in the issue is unexpected and needs further investigation.The behavior reported in the issue is unexpected and needs further investigation.OS-WindowsReview - MaintainerThe PR/issue needs a review from the PowerShell repo MaintainersThe PR/issue needs a review from the PowerShell repo Maintainers
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
Thanks to @mklement0 for providing this very straightforward repro step
Get-AppLockerFileInformation NoSuch.exe -ErrorAction Stop; 'after'Expected behavior
The "after" should not be printed.
Get-AppLockerFileInformation NoSuch.exe -ErrorAction Stop; 'after'
Get-AppLockerFileInformation: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.Actual behavior
"after" is printed
Get-AppLockerFileInformation NoSuch.exe -ErrorAction Stop; 'after'
Get-AppLockerFileInformation: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
afterThis problem doesn't happen in PowerShell 7.3.6
Error details
OriginInfo : localhost
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.ItemNotFoundException: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.PSCmdlet.GetResolvedProviderPathFromPSPath(String path, ProviderInfo& provider)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPath(PSCmdlet cmdlet, String path)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPaths(PSCmdlet cmdlet, ICollection`1 paths)
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.ItemNotFoundException: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.PSCmdlet.GetResolvedProviderPathFromPSPath(String path, ProviderInfo& provider)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPath(PSCmdlet cmdlet, String path)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPaths(PSCmdlet cmdlet, ICollection`1 paths)
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.ItemNotFoundException: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.PSCmdlet.GetResolvedProviderPathFromPSPath(String path, ProviderInfo& provider)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPath(PSCmdlet cmdlet, String path)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPaths(PSCmdlet cmdlet, ICollection`1 paths)
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.ItemNotFoundException: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.PSCmdlet.GetResolvedProviderPathFromPSPath(String path, ProviderInfo& provider)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPath(PSCmdlet cmdlet, String path)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPaths(PSCmdlet cmdlet, ICollection`1 paths)
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.ItemNotFoundException: Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean allowNonexistingPaths, ProviderInfo& provider, CmdletProvider& providerInstance)
at System.Management.Automation.PSCmdlet.GetResolvedProviderPathFromPSPath(String path, ProviderInfo& provider)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPath(PSCmdlet cmdlet, String path)
at Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.CmdletHelper.ResolvePSPaths(PSCmdlet cmdlet, ICollection`1 paths)
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord : …
Message : Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
HResult : -2146233087
TargetObject : NoSuch.exe
CategoryInfo : InvalidArgument: (NoSuch.exe:String) [Get-AppLockerFileInformation], ItemNotFoundException
FullyQualifiedErrorId : CmdletHelper-FailedResolvingPSPath,Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.GetAppLockerFileInformationCmdlet
Message : Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
HResult : -2146233087
TargetObject : NoSuch.exe
CategoryInfo : InvalidArgument: (NoSuch.exe:String) [Get-AppLockerFileInformation], ItemNotFoundException
FullyQualifiedErrorId : CmdletHelper-FailedResolvingPSPath,Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.GetAppLockerFileInformationCmdlet
Message : Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
HResult : -2146233087
TargetObject : NoSuch.exe
CategoryInfo : InvalidArgument: (NoSuch.exe:String) [Get-AppLockerFileInformation], ItemNotFoundException
FullyQualifiedErrorId : CmdletHelper-FailedResolvingPSPath,Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.GetAppLockerFileInformationCmdlet
Message : Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
HResult : -2146233087
TargetObject : NoSuch.exe
CategoryInfo : InvalidArgument: (NoSuch.exe:String) [Get-AppLockerFileInformation], ItemNotFoundException
FullyQualifiedErrorId : CmdletHelper-FailedResolvingPSPath,Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.GetAppLockerFileInformationCmdlet
Message : Cannot find path 'C:\Users\HotCakeX\NoSuch.exe' because it does not exist.
HResult : -2146233087
TargetObject : NoSuch.exe
CategoryInfo : InvalidArgument: (NoSuch.exe:String) [Get-AppLockerFileInformation], ItemNotFoundException
FullyQualifiedErrorId : CmdletHelper-FailedResolvingPSPath,Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets.GetAppLockerFileInformationCmdletEnvironment data
Name Value
---- -----
PSVersion 7.4.0-preview.5
PSEdition Core
GitCommitId 7.4.0-preview.5
OS Microsoft Windows 10.0.22631
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
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 productNeeds-InvestigationThe behavior reported in the issue is unexpected and needs further investigation.The behavior reported in the issue is unexpected and needs further investigation.OS-WindowsReview - MaintainerThe PR/issue needs a review from the PowerShell repo MaintainersThe PR/issue needs a review from the PowerShell repo Maintainers