Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting winrm.exceptions.InvalidCredentialsError: the specified credentials were rejected by the server #448

Open
rsingh2411 opened this issue Jun 15, 2021 · 0 comments

Comments

@rsingh2411
Copy link

rsingh2411 commented Jun 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant