VMM 2019 powershell commands won't work over WinRM

Dhanoa, Arvinder S 6 Reputation points
2022-06-14T18:49:29.233+00:00

Hi! Recently we've been trying to get winrm to be able to connect to a server which can run VMM power shell commands ( Get-SCVirtualMachine -VMMServer <our server url> as a trivial example). This works fine on the server locally with the account we created. However, when remoting into the server with winrm and using the same credentials, we get the error:

You cannot access VMM management server <our server url>.
Contact the Virtual Machine Manager administrator to verify that your account is a member of a valid user role and then try the operation again.
+ CategoryInfo : ReadError: (:) [Get-SCVirtualMachine], CarmineException
+ FullyQualifiedErrorId : 1604,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.GetVMCmdlet

The use-case is that we want to run some functionality from Ansible against VMM (namely creating / deleting checkpoints). As far as we are aware there's no way for a linux client to communicate with VMM directly, so the plan was to have a windows Ansible client which would execute the power shell commands against VMM needed to be run by Ansible using winrm. We know that the windows server, when the commands are ran locally by the account, can communicate with VMM properly, and we see in our network logs that we do hit VMM for something when adding in the singular winrm hop. Despite this however, when adding the winrm hop we get the above error.

In other words:
The path: server (power shell command) -> VMM directly works fine, however:

ansible/manual winrm connection -> server (power shell command) -> VMM creates the above error.

For debugging purposes we did give the user admin rights on both the server and on VMM, however that didn't help.

System Center Virtual Machine Manager
{count} vote

1 answer

Sort by: Most helpful
  1. MarkosP 1 Reputation point
    2024-03-12T09:14:03.4033333+00:00

    Have you ever figured out if it's possible? We're facing exactly the same problem - SC VMM's cmdlets don't work when executed in a remote session.

    0 comments No comments