I am trying out SCVMM list vms method, but when i am running the code getting
File "/Users/rohsing2/.pyenv/versions/3.7.7/lib/python3.7/site-packages/winrm/transport.py", line 268, in _send_message_request raise InvalidCredentialsError("the specified credentials were rejected by the server") winrm.exceptions.InvalidCredentialsError: the specified credentials were rejected by the server
I am able to get information running command directly by importing winrm module stand alone
#ps_script = """ Get-SCVirtualMachine -All -VMMServer localhost """ #s = winrm.Session("http://x.x.x.x.:5985/wsman", auth=('test', 'test$@#123'), transport='ntlm',server_cert_validation='ignore') #r = s.run_ps(ps_script) #print(str(r.std_out))
my code is straightforward
system = SCVMMSystem(hostname='x.x.x.x', username='test', password="test$@#123",domain=somevalue", provisioning="xxxx") system.list_vms()
Do we need domain value , and provisioning value as standalone winrm code is able to get information without it.
value for domain is known but what will be value for provisioning field.