Getting winrm.exceptions.InvalidCredentialsError: the specified credentials were rejected by the server
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure through SCVMMSystem.list_vms(), then inspect the SCVMMSystem constructor and compare its authentication arguments with the working winrm.Session example. Check how domain and provisioning are consumed and whether they alter the WinRM credentials. Done means the credential mismatch is explained and the required values or a confirmed code fix are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100