Skip to content

Get-EventLog is stated by docs to accept IP addresses for the -ComputerName parameter; this functionality does not actually work #4019

@softwareguycoder

Description

@softwareguycoder

This doc says Get-EventLog takes IP addresses for the -ComputerName parameter, however, at least it's true that the "loopback address," i.e., 127.0.0.1 which is well-known, does not work, as is shown in the PowerShell session below.

I have no way of testing, on the computer I am currently working on, whether other IP addresses work, but I am surprised that 127.0.0.1 is not accepted. Either the IP-address functionality is broken completely in this cmdlet and the docs are wrong, or it just won't take the Loopback address (which it should, to mean the same computer it's being run on), or the docs are plain wrong in that IP addresses just are not accepted by the -ComputerName parameter.

PS > $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  316


PS > Get-EventLog -LogName Security -ComputerName "127.0.0.1"
Get-EventLog : The network path was not found.
At line:1 char:1
+ Get-EventLog -LogName Security -ComputerName "127.0.0.1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-EventLog], IOException
    + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.GetEventLogCommand

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

area-managementArea - Microsoft.PowerShell.Management module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions