SharePoint server 2016 Troubleshooting: Workflow Manager 1.0. - The term 'Register-SPWorkflowService' is not recognized

Issue

When trying to register the Workflow Manager with SharePoint server 2106 farm, you end up with this error: 

PS C:\Program Files\Workflow Manager\1.0> Register-SPWorkflowService -SPSite "ht

tps://test.krossfarm.com/sites/WorkflowManager" -WorkflowHostUri "https://

kf-wf.krossfarm.com:12290/"

Register-SPWorkflowService : The term 'Register-SPWorkflowService' is not

recognized as the name of a cmdlet, function, script file, or operable

program. Check the spelling of the name, or if a path was included, verify

that the path is correct and try again.

At line:1 char:1

+ Register-SPWorkflowService -SPSite

"https://test.krossfarm.com/sites/Workfl ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Register-SPWorkflowService:Stri

   ng) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

 

Reason

You are trying to run the command in the Workflow Manager PowerShell on the server where SharePoint is not installed or you forget to add the Add-PSSnapin "Microsoft.SharePoint.PowerShell" in the Workflow Manager PowerShell.

 

Resolution

Open the SharePoint Management Shell as administrator, then run the Register-SPWorkflowService. Make Sure the Workflow Client is installed on this server if WFM not installed on this machine.

Open the Workflow Manager PowerShell as Administrator then add the PSNAPin SharePoint then run the command like this,



      Add-PSSnapin     "Microsoft.SharePoint.PowerShell"  
      Register-SPWorkflowService -SPSite     "          https://test.krossfarm.com/sites/WorkflowManager        " -WorkflowHostUri "https://kf-wf.krossfarm.com:12290/"