- Write-EventLog -LogName $Name-ComputerName $Server -Source $Source -Message $Message -EventId $ID
Is there a way to avoid the waiting time for the CmdLet? I've thought about the following options:
1. Using Start-Process, but this might bring up another PowerShell pop-up window which is not desirable.
2. Write messages to the local Event Log and make a copy script to copy these entries to the central server (assuming that writing locally it's faster)
3. Create a job that continuously runs with the sole purpose of writing stuff to the log on the central server. But I don't know how to feed it new data once it's launched.
4. User runspaces as described here: https://smsagent.wordpress.com/2015/09/ ... lications/ But I don't know how to implement that.
Any input on this is more then welcome. Thank you for your help.