none
(PowerShell) Remote eventcreate fails with "ERROR: no such host is known." RRS feed

  • Question

  • Hi

    I'm very new to this whole scripting stuff. I'm trying to create a script that adds a message to the event log on a remote computer but I get the error mentioned in the title.

    The command I'm using is :

    eventcreate /id 500 /s $ipaddress /u $username /p $password /l application /t information /d "description"
    I was able to get this working on another computer that was directly connected to mine with a cable, but now that I'm trying to do the same over a more complex network (computer->router->mobile network->router->computer) it's failing. So I'm assuming it's a network/firewall issue? I am able to connect to the remote computer with RealVNC and to an ftp server running on it using its IP-address, so the network itself seems to be functioning. I have also disabled firewalls on both computers. So apparently a firewall on a router is blocking something? Are there some special configurations that remote eventcreate requires from firewalls/routers?

    • Moved by Bill_Stewart Friday, January 26, 2018 2:49 PM This is not command-line tool support forum
    Tuesday, November 28, 2017 3:33 PM

All replies

  • You are not executing any script commands.  You are just executing a system utility.

    The error message is accurate.  The server name you have used cannot be found.  Use a valid server name.

    For help using system utilities you can do best by posting in the forum for your version of Windows.


    \_(ツ)_/

    Tuesday, November 28, 2017 7:01 PM
  • For PowerShell use "Write-EventLog"

    help Write-EventLog -online


    \_(ツ)_/

    Tuesday, November 28, 2017 7:05 PM
  • You are not executing any script commands.  You are just executing a system utility.

    The error message is accurate.  The server name you have used cannot be found.  Use a valid server name.

    For help using system utilities you can do best by posting in the forum for your version of Windows.


    \_(ツ)_/

    It is actually a part of a script, I just posted the relevant part. I'm using an ip-address and I know it's correct, I can connect to ftp and realvnc servers with it. And I just thought people here might be more knowledgeable about these things.
    Wednesday, November 29, 2017 6:33 AM