Hi @pancakes0111992 ,
Short answer:
Make sure Az.ServiceBus module version in your Azure Automation account is updated to latest version or to same version that you have in your local machine.
Long answer:
Check what's the version of Set-AzServiceBusGeoDRConfigurationFailOver cmdlet related module Az.ServiceBus in both local machine and in Azure Automation account by running below commands.
Get-Command Set-AzServiceBusGeoDRConfigurationFailOver
Get-Module Az.ServiceBus
(Get-Command Set-AzServiceBusGeoDRConfigurationFailOver).Parameters['NamespaceName']
For illustration, check below screenshots.
Local Machine:
Azure Automation account:
As I could see that NamespaceName parameter doesn't exist for 1.9.0 version of Az.ServiceBus module in my Azure Automation account so I have validated the same in modules tile of my Azure Automation account and have updated them as shown below.
Note that while adding the new version of Az.ServiceBus module if you get a warning to update dependent modules like Az.Accounts then please do it and then add the new version of Az.ServiceBus module. Also, note that the module runtime version should match with the runbook runtime version.
Then, I have executed the runbook again to see if it gets the NamespaceName parameter after updating the Az.ServiceBus module as shown below.
So, to resolve the issue, make sure Az.ServiceBus module version in your Azure Automation account is updated to latest version or to same version that you have in your local machine.