The service name is invalid

3,144 views
Skip to first unread message

Leonardo Rodrigues

unread,
Mar 20, 2023, 10:58:04 AM3/20/23
to Wazuh mailing list
Hello Wazuh team

I am getting an error activating the installed agent via powershell.
You can help?


The error I get after running the command

NET START WazuhSvc


"The service name is invalid"

Francisco Tuduri

unread,
Mar 20, 2023, 11:02:38 AM3/20/23
to Wazuh mailing list
Hello Leonardo!

Could you share what versions did you install? and what steps or guide did you follow to install the agent?
Regards!

Francisco Tuduri

unread,
Mar 20, 2023, 12:14:36 PM3/20/23
to Wazuh mailing list
A couple of extra questions:

Was this a fresh installation or were you trying to upgrade the agent?
What Windows version are you using?

Could you check the contents of the installation directory?

ls 'C:\Program Files (x86)\ossec-agent\'

Could you share the output of this command to see if the agent is installed?

Get-CimInstance -Class Win32_Product -Filter "Name = 'Wazuh Agent'"

Thanks!

Leonardo Rodrigues

unread,
Mar 20, 2023, 2:32:52 PM3/20/23
to Wazuh mailing list
Hello Francisco

It's a new install in the system Windows Server 2012 R2.

PS C:\Program Files (x86)> cd .\ossec-agent
PS C:\Program Files (x86)\ossec-agent> ls


    Directory: C:\Program Files (x86)\ossec-agent


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        16/03/2023     17:40            upgrade
-a---        17/03/2023     11:09          0 client.keys.
-a---        19/08/2022     08:02        383 local_intern
-a---        17/03/2023     11:09       9935 ossec.conf.s


PS C:\Program Files (x86)\ossec-agent>  Get-CimInstance -Class Win32_Product -Filter "Name = 'Wazuh Agent'"
PS C:\Program Files (x86)\ossec-agent>
PS C:\Program Files (x86)\ossec-agent>

Francisco Tuduri

unread,
Mar 20, 2023, 3:39:52 PM3/20/23
to Wazuh mailing list
Hello Leonardo,
I assume you are installing v4.3.10.
Is it possible that you installed it from a regular user PowerShell instead of as Administrator?

I just tried that, installing from a non-administrator powershell, and no error was displayed but the agent was not installed. Then I tried with administrator privileges and it worked correctly.

Leonardo Rodrigues

unread,
Mar 21, 2023, 10:55:16 AM3/21/23
to Wazuh mailing list
Hello Franciso,

I followed your instructions and the problem was solved.

Thanks for the help.

Francisco Tuduri

unread,
Mar 21, 2023, 10:58:58 AM3/21/23
to Wazuh mailing list
Great! Glad that it is working now! And thanks for letting us know that.

Have a nice day!
Reply all
Reply to author
Forward
0 new messages