Hello there,
To write into the Application Windows log remotely using PowerShell, you can utilize the Write-EventLog cmdlet along with the -ComputerName parameter. Here's an example of how to do it:
$computerName = "RemoteComputerName"
$source = "PowerShellScript"
$eventID = 1001
$entryType = "Information"
$message = "This is a test event log message."
Write-EventLog -LogName Application -Source $source -EventID $eventID -EntryType $entryType -Message $message -ComputerName $computerName
Make sure to replace the placeholders with the appropriate values:
$computerName: Specify the name or IP address of the remote computer where you want to write to the Application log.
$source: Provide the source name for the event log entry. This can be a custom name to identify the source of the log entry.
$eventID: Assign a unique event ID to the log entry.
$entryType: Specify the type of the log entry. It can be "Error," "Warning," "Information," or "SuccessAudit."
$message: Add the desired message for the log entry.
I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--