Powershell: Get-eventlog tab completes but is not a cmdlet

Created on 7 Jun 2019  Â·  4Comments  Â·  Source: PowerShell/PowerShell

Steps to reproduce

Run Get-eventlog

Expected behavior

This command by itself should ask the user to specify a value for the parameter "logname" and then get the contents of the log matching the new value of that parameter.

Actual behavior

Returns the following error:
Get-EventLog : The term 'Get-EventLog' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-EventLog
+ ~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-EventLog:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.1
PSEdition                      Core
GitCommitId                    7.0.0-preview.1
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue-Question Resolution-Answered

Most helpful comment

Get-EventLog is deprecated as it only supports the old EventLog APIs (which doesn't have access to the new ETW logs). Instead, users should be using Get-WinEvent which uses the new ETW APIs and can get the old EventLog logs.

All 4 comments

Not able to repro. This cmdlet doesn't tab completes as it doesn't exist so far in PowerShell 6+ .

So is the get-eventlog cmdlet still coming to powershell 7? The cmdlet does tab complete but it fails when run.

Chris Maunder
Systems Administrator
Royal Engineered Composites

308-832-2760 x110
[email protected]CMaunder@royalcomposites.com
From: PRASOON KARUNAN V notifications@github.com
Sent: Friday, June 7, 2019 12:09 PM
To: PowerShell/PowerShell PowerShell@noreply.github.com
Cc: Chris Maunder CMaunder@royalcomposites.com; Author author@noreply.github.com
Subject: Re: [PowerShell/PowerShell] Get-eventlog tab completes but is not a cmdlet (#9852)

Not able to repro. This cmdlet doesn't tab completes as it doesn't exist so far in PowerShell 6+ .

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/PowerShell/issues/9852?email_source=notifications&email_token=AI5WA7XGXYVLW4BKV24BIOTPZKI3DA5CNFSM4HVXDQJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXGNT4Q#issuecomment-499964402, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI5WA7WKM4JDBNS6HMIJCHDPZKI3DANCNFSM4HVXDQJA.

/cc @SteveL-MSFT Should we get Get-EventLog cmdlet back in 7.0?
Should we make an inventory in return all missing cmdlets?

Get-EventLog is deprecated as it only supports the old EventLog APIs (which doesn't have access to the new ETW logs). Instead, users should be using Get-WinEvent which uses the new ETW APIs and can get the old EventLog logs.

Was this page helpful?
0 / 5 - 0 ratings