Skip to content

Reword access denied error message in Get-WinEvent - #10639

Merged
Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
iSazonov:get-winevent-error-mesage
Oct 14, 2019
Merged

Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
iSazonov:get-winevent-error-mesage

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Sep 27, 2019 •

Copy link
Copy Markdown
Collaborator

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 Ilya (iSazonov) self-assigned this Sep 27, 2019
@iSazonov Ilya (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 Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Sep 27, 2019
@iSazonov

Copy link
Copy Markdown
Collaborator Author

Joey Aiello (@joeyaiello) Steve Lee (@SteveL-MSFT) Could you please look the new error message?

</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
Copy Markdown
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
Copy Markdown
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

Ilya (iSazonov) commented Oct 11, 2019 •

Copy link
Copy Markdown
Collaborator Author

Steve Lee (@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
Ilya (iSazonov) merged commit 76a811c into PowerShell:master Oct 14, 2019
@iSazonov
Ilya (iSazonov) deleted the get-winevent-error-mesage branch October 14, 2019 17:02
@ghost

Copy link
Copy Markdown

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

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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