Trying to set Azure cloud witness remotely

I have a large number of clusters all with the witness configured on a local file server. We need to move all of the witness to Azure cloud.

It seems like it should be easy, but i guess I am running into the “Double Hop” issue? Was wondering if anyone could confirm that.

When I run this locally it works, when I use it like this remotely, it fails saying cannot connect WinRM error etc…

$Clusters = "MyCluster"
foreach($cluster in $clusters){
    Invoke-Command -ComputerName "$cluster" -Scriptblock {Set-ClusterQuorum -CloudWitness -AccountName "MyAccount" -AccessKey "MyKey"


It looks like this command supports -Cluster in which case, WinRM/Invoke command should not be neccessary ?? (no way for me to test BTW). There are several items to take into account with Remote PowerShell/Invoke-Command. Your entire error you mentioned would be nice.

Set-ClusterQuorum -Cluster $cluster -CloudWitness -AccountName "MyAccount" -AccessKey "MyKey"

I tried like these:

Set-ClusterQuorum -cluster $cluster -CloudWitness -AccountName "MyAccount" -AccessKey "MyKey"

Set-ClusterQuorum: ERROR CODE : 0x80131500;
 The WinRM client cannot process the request. The object contains an unrecognized argument: "SASToken". Verify that the spelling of the argument name is correct.
Set-ClusterQuorum -CloudWitness -AccountName "MyAccount" -AccessKey "MyKey" -Endpoint mycluster

WARNING: If you are running Windows PowerShell remotely, note that some failover clustering cmdlets do not work remotely. When possible, run the cmdlet locally and specify a remote computer as the target. To run the cmdlet remotely, try using the Credential Security Service Provider (CredSSP). All additional errors or warnings from this cmdlet might be caused by running it remotely.
Set-ClusterQuorum: The cluster service is not running.  Make sure that the service is running on all nodes in the cluster.
    There are no more endpoints available from the endpoint mapper