compdigit44
asked on
Get-EventLog unable to read from Text File
I am trying to use the Get-Eventlog commandlet to search a list of computer to select event ID's. When I try to run it it keeps getting the message null value to accepted. When I type in the get-content for my text file is list all devices in my file correctly. What am I doing wrong.
Get-Content c:\machines_List.txt | Foreach-Object {Get-EventLog -LogName application -EntryType Error -ComputerName $_ | ?{$_.eventid -like "1000"}
Get-Content c:\machines_List.txt | Foreach-Object {Get-EventLog -LogName application -EntryType Error -ComputerName $_ | ?{$_.eventid -like "1000"}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER