I have multiple machines I have configured for an AzurePublishSettings file, on two of the three the following command works without issue
New-AzureResourceGroup -name $name -Location $location
On the last machine the following error is thrown out:
New-AzureResourceGroup : Unauthorized
At line:9 char:1
+ New-AzureResourceGroup -name $name -Location $location
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureResourceGroup], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupCommand
Digging a bit futher, it appears other basic Azure commands also fail with issues authenticating. Where do I even begin to track down why it is not working on only one particular machine? The main difference with the last one is it having Orchestrator installed as a RunBook server, the eventual final code I would like to include in a runbook that runs against this one server.
As an aside, has anyone else had success building RunBooks that run .NET Azure PowerShell command blocks within the runbook?