I have a Windows Server 2022 Failover-Cluster consisting of two nodes. It has the Fileserver role configured (by wizard) which works as expected.

Using the Failovercluster-Manager (GUI), I added another resource of type Generic Service to that role. I selected the desired service and entered the desired command-line options as Startup parameters and confirmed by Get-ClusterResource -Name myservice | Get-ClusterParameter.

When I put the resource online (in GUI or PowerShell Start-ClusterResource), the service will start, but Task Manager reveals that the executable was started without command-line options.

How can I provide command-line options to this service?

  • Can you try with PowerShell to create the service, because I think you did it the proper way. If you need guidance with a PowerShell script let me then i can provide a example as an answer.
    – Turdie
    Commented Dec 20, 2023 at 11:48

1 Answer 1


One way I found is to edit the service definition in the Registry. Locate the Registry key of the service (by service name, not display name):


The value of ImagePath might be something like this:


Append the desired command-line options to ImagePath, like so:

%SystemRoot%\system32\myservice.exe -a -bc --something -f "D:\somefolder\configfile"

Be sure to use only valid options and the correct format (-f vs. /F) expected by that executable. Invalid options or syntax will prevent the service from starting.

Do that identically on all cluster nodes, then stop and start the cluster resource.

PS: Adding that registry key to the registry replication keys of that cluster resource did not yield the desired result. It always reset ImagePath (removed the command-line arguments) before starting the service. But I may have done that in the wrong order.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .