我无法让 PowerShell 将 LogName 添加到 csv

i cannot get PowerShell to add the LogName to the csv

我无法让 PowerShell 将 LogName 添加到 csv。我是 运行 这个命令:

Invoke-Command -ComputerName Server -Credential $cred -Authentication Default -ScriptBlock { 
    Get-EventLog -LogName System -EntryType Error | 
        Select-Object -Property PSComputerName, Site,TimeGenerated, EventID, Message, Source, EntryType
} | Export-Csv -NoTypeInformation -Path C:/output.csv

如有任何帮助,我们将不胜感激

马特答对了,经过测试,他简单优雅的方法完美运行。非常感谢马特。非常感激。