Skip to content

Reword access denied error message in Get-WinEvent #10639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Sep 27, 2019

PR Summary

Fix #10637

New reworded message:

Get-WinEvent : Attempted to perform an unauthorized operation. To access the 'Security' log start PowerShell by using the "Run as Administrator" command.
At line:1 char:1
+ Get-WinEvent -LogName Security
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-WinEvent], Exception
+ FullyQualifiedErrorId : LogInfoUnavailable,Microsoft.PowerShell.Commands.GetWinEventCommand

PR Context

PR Checklist

@iSazonov iSazonov self-assigned this Sep 27, 2019
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Sep 27, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.5 milestone Sep 27, 2019
@iSazonov
Copy link
Collaborator Author

iSazonov commented Oct 8, 2019

@joeyaiello @SteveL-MSFT Could you please look the new error message?

@@ -253,7 +253,7 @@ The defined template is following:
<value>The following value is not in a valid DateTime format: {0}.</value>
</data>
<data name="LogInfoUnavailable" xml:space="preserve">
<value>Could not retrieve information about the {0} log. Error: {1}.</value>
<value>{1} To access the '{0}' log start PowerShell by using the "Run as Administrator" command.</value>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Run as Administrator" is a Windows Shell specific thing, may be better to say: ...start PowerShell with elevated user rights

(I searched and we use this type of language already in existing resource strings)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

We need to review all resx file for "using the "Run as Administrator" command".

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Oct 8, 2019
@iSazonov
Copy link
Collaborator Author

iSazonov commented Oct 11, 2019

@SteveL-MSFT Please update your code review.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 11, 2019
…ntResources.resx

Co-Authored-By: Steve Lee <slee@microsoft.com>
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 11, 2019
@iSazonov iSazonov merged commit 76a811c into PowerShell:master Oct 14, 2019
@iSazonov iSazonov deleted the get-winevent-error-mesage branch October 14, 2019 17:02
@ghost
Copy link

ghost commented Oct 23, 2019

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get-WinEvent - Suggested enhancements
2 participants