How to login remote windos device using python

Iranna Mathapati iranna.gani28 at gmail.com
Tue Aug 20 05:15:32 EDT 2019


Hi Kyle,

I have tried with as per above attached links and it leads following error:
NOTE: Its able to connect  local

Failed to connect remote windows
>>> import wmi
>>> c = wmi.WMI("XX.XX.XX.XX", user=r"XXX\XXXXXXX", password="XXXXXXXX")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\wmi.py", line 1290, in connect
    handle_com_error ()
  File "C:\Python27\lib\site-packages\wmi.py", line 241, in handle_com_error
    raise klass (com_error=err)
wmi.x_wmi: <x_wmi: Unexpected COM Error (-2147352567, 'Exception
occurred.', (0, u'SWbemLocator', u'The RPC server is unavailable. ', None,
0, -2147023174), None)>

On Tue, Aug 20, 2019 at 7:03 AM Kyle Stanley <aeros167 at gmail.com> wrote:

> I would recommend checking out WMI: https://pypi.org/project/WMI/
>
> For remote connection as a named user (official WMI docs):
> http://timgolden.me.uk/python/wmi/tutorial.html#connecting-to-a-remote-machine-as-a-named-user
>
> Also, another example (unofficial):
> https://stackoverflow.com/questions/18961213/how-to-connect-to-a-remote-windows-machine-to-execute-commands-using-python.
> This was done in Python2, but the example is still useful.
>
> On Mon, Aug 19, 2019 at 2:11 PM Iranna Mathapati <iranna.gani28 at gmail.com>
> wrote:
>
>> Hi Team,
>>
>> can you please let me know, How to login the remote Windows machine using
>> python??
>>
>> Thanks
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>



More information about the Python-list mailing list