Register-ClusteredScheduledTask fails with The RPC server is unavailable

Joe Bruns 21 Reputation points
2022-01-21T01:21:53.737+00:00

Trying to run on windows server 2016:

$action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument '-file C:\Supportfiles\scripts\bes\monitorSQLConnection.ps1' -WorkingDirectory C:\Supportfiles\scripts\bes
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 10)
Register-ClusteredScheduledTask –Cluster MyCluster –TaskName 'EMI Check SQL Port 1600' –TaskType ResourceSpecific –Resource 'BES Root Server' –Action $action –Trigger $trigger -Description 'Checking SQL port 1600 every 10 minutes to make sure SQL connection is alive.'

Then I get:

Register-ClusteredScheduledTask : The RPC server is unavailable.
At line:1 char:1

  • Register-ClusteredScheduledTask –Cluster MyCluster –TaskName 'EMI Che ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (PS_ClusteredScheduledTask:Root/Microsoft/...edScheduledTask) [Register-ClusteredScheduledTask], CimException
  • FullyQualifiedErrorId : HRESULT 0x800706ba,Register-ClusteredScheduledTask

Why?

Windows for business | Windows Server | Storage high availability | Clustering and high availability
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,921 Reputation points
    2022-01-21T22:36:00.557+00:00

    Hello @Joe Bruns

    "The RPC server is unavailable" error message you would get this typically when Cluster Service is down on the node where the PowerShell command is being run. Please check the state of the cluster service is running on that node.

    Hope this helps with your query,

    -------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. Joe Bruns 21 Reputation points
    2022-01-22T00:10:35.43+00:00

    Unfortuntely, cluster service is up and happy.

    PS C:\Users\xxxxxxx> Get-Service ClusSvc

    Status Name DisplayName


    Running ClusSvc Cluster Service

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.