If you run the new Resolve-Error, and erroneously use "-Last 2", you get an error which incorrectly identifies the cmdlet as Resolve-AZError
Resolve-Error -Last 2
I would have expected to see the cmdlet with the error to be identified as Resolve-Error..
PS [C:\foo> ]> Resolve-error -last 2
Resolve-AzError: A positional parameter cannot be found that accepts argument '2'.
PS [C:\foo> ]> $PSVersiontable
Name Value
---- -----
PSVersion 7.0.0-daily.20191008
PSEdition Core
GitCommitId 7.0.0-daily.20191008
OS Microsoft Windows 10.0.18995
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.0, 6.1.0, 6.2.0, 7.0.0-daily.20191008}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Az.Accounts module has the Resolve-AzError cmdlet and its alias Resolve-Error.
@SteveL-MSFT might it be better to rename the command to Format-ErrorRecord or Show-ErrorRecord as has been suggested in the ErrorView RFC / PRs, to prevent confusion with the Az cmdlets?
@doctordns the Az module is not maintained by the PowerShell team.
Unfortunately, the Az module has Resolve-Error alias. Maybe that is a good reason to avoid Resolve-ErrorRecord, however, we did take rve alias :) cc @theJasonHelmick
So my bad!
But I do prefer the name is Format-ErrorRecord
Most helpful comment
Az.Accounts module has the Resolve-AzError cmdlet and its alias Resolve-Error.