{"id":16190627,"url":"https://github.com/tiagocoutinho/ptwinrm","last_synced_at":"2025-03-19T03:30:57.443Z","repository":{"id":62578237,"uuid":"96985511","full_name":"tiagocoutinho/ptwinrm","owner":"tiagocoutinho","description":"winrm console based on python prompt toolkit and pywinrm","archived":false,"fork":false,"pushed_at":"2017-07-12T12:58:22.000Z","size":9,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:05:15.089Z","etag":null,"topics":["console","python","python-prompt-toolkit","pywinrm","winrm"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagocoutinho.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-12T08:44:46.000Z","updated_at":"2023-10-30T11:50:17.000Z","dependencies_parsed_at":"2022-11-03T19:45:13.227Z","dependency_job_id":null,"html_url":"https://github.com/tiagocoutinho/ptwinrm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fptwinrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fptwinrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fptwinrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fptwinrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagocoutinho","download_url":"https://codeload.github.com/tiagocoutinho/ptwinrm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965723,"owners_count":20375920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","python","python-prompt-toolkit","pywinrm","winrm"],"created_at":"2024-10-10T07:43:47.218Z","updated_at":"2025-03-19T03:30:57.091Z","avatar_url":"https://github.com/tiagocoutinho.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ptwinrm\n=======\n\nA Python_, prompt_toolkit_ and pywinrm_ based WinRM console:\n\n.. image:: https://asciinema.org/a/C5wHOTBWELzNRbWFlGpuZUBUK.png\n   :alt: asciinema cast\n   :target: https://asciinema.org/a/C5wHOTBWELzNRbWFlGpuZUBUK?autoplay=1\u0026speed=2\u0026loop=1\u0026size=medium\u0026theme=asciinema\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install ptwinrm\n\n\nRequirements\n------------\n\n- Python_ \u003e= 2.6\n- docopt\n- pywinrm\n- prompt_toolkit\n\nUsage\n-----\n\nBefore connecting to the windows machine, make sure the winrm service is running and the firewall\nis opened for winrm connections. On my windows machine I had to do the following on the windows\ncommand line::\n\n    # make firewall respect our wishes\n    C:\\\u003enetsh advfirewall add rule name=\"WinRM-HTTP\" dir=in localport=5985 protocol=TCP action=allow\n    C:\\\u003enetsh advfirewall add rule name=\"WinRM-HTTPS\" dir=in localport=5986 protocol=TCP action=allow\n\n    # configure winrm\n    C:\\\u003ewinrm quickconfig\n\n    # Allow non encrypted (for pywinrm)\n    C:\\\u003ewinrm set winrm/config/servive '@{AllowUnencrypted=\"true\"}'\n\nThen you can try to connect from another machine (linux, OSX, windows):\n\n.. code-block:: bash\n\n    $ ptwinrm --user=\"acme\\roadrunner\" --run=\"ver\" acme-rr.com\n    password: ********\n\n    Microsoft Windows [Version 6.1.7601]\n\n    $ ptwinrm --user=\"acme\\roadrunner\" acme-rr.com\n   password: ********\n\n   C:\\Users\\roadrunner\u003edir\n    Volume in drive C is System\n    Volume Serial Number is 8C20-216F\n\n    Directory of C:\\Users\\roadrunner\n\n   20/04/2017  09:29    \u003cDIR\u003e          .\n   20/04/2017  09:29    \u003cDIR\u003e          ..\n   05/07/2017  10:58    \u003cDIR\u003e          Contacts\n   05/07/2017  10:58    \u003cDIR\u003e          Desktop\n   03/05/2016  11:10    \u003cDIR\u003e          Documents\n   06/07/2017  11:04    \u003cDIR\u003e          Downloads\n   05/07/2017  10:58    \u003cDIR\u003e          Favorites\n   05/07/2017  10:58    \u003cDIR\u003e          Links\n   28/06/2017  08:18    \u003cDIR\u003e          Mails\n   05/07/2017  10:58    \u003cDIR\u003e          Music\n   05/07/2017  10:58    \u003cDIR\u003e          Pictures\n   05/07/2017  10:58    \u003cDIR\u003e          Saved Games\n   05/07/2017  10:58    \u003cDIR\u003e          Searches\n   06/03/2013  15:09    \u003cDIR\u003e          Tracing\n   05/07/2017  10:58    \u003cDIR\u003e          Videos\n\n   C:\\Users\\roadrunner\u003e ipconfig /all\n   Windows IP Configuration\n\n      Host Name . . . . . . . . . . . . : ACME-RR\n      Primary Dns Suffix  . . . . . . . : acme.com\n      Node Type . . . . . . . . . . . . : Hybrid\n      IP Routing Enabled. . . . . . . . : No\n      WINS Proxy Enabled. . . . . . . . : No\n      DNS Suffix Search List. . . . . . : acme.com\n\n   Ethernet adapter Local Area Connection 2:\n\n      Media State . . . . . . . . . . . : Media disconnected\n      Connection-specific DNS Suffix  . :\n      Description . . . . . . . . . . . : Intel(R) Gigabit CT Desktop Adapter\n      Physical Address. . . . . . . . . : 55-44-33-22-11-00\n      DHCP Enabled. . . . . . . . . . . : No\n      Autoconfiguration Enabled . . . . : Yes\n\n   Ethernet adapter Local Area Connection:\n\n      Connection-specific DNS Suffix  . : acme.com\n      Description . . . . . . . . . . . : Acme(R) Gigabit Network Connection\n      Physical Address. . . . . . . . . : 00-11-22-33-44-55\n      DHCP Enabled. . . . . . . . . . . : Yes\n      Autoconfiguration Enabled . . . . : Yes\n      IPv4 Address. . . . . . . . . . . : 199.199.1.172(Preferred)\n      Subnet Mask . . . . . . . . . . . : 255.255.254.0\n      Lease Obtained. . . . . . . . . . : quarta-feira 5 julho 2017 10:41:49\n      Lease Expires . . . . . . . . . . : quarta-feira 3 janeiro 2018 22:42:05\n      Default Gateway . . . . . . . . . : 199.199.1.1\n      DHCP Server . . . . . . . . . . . : 198.198.60.11\n      DNS Servers . . . . . . . . . . . : 198.198.208.9\n                                          198.198.209.9\n      NetBIOS over Tcpip. . . . . . . . : Enabled\n\n   Tunnel adapter isatap.acme.com:\n\n      Media State . . . . . . . . . . . : Media disconnected\n      Connection-specific DNS Suffix  . : acme.com\n      Description . . . . . . . . . . . : Microsoft ISATAP Adapter\n      Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0\n      DHCP Enabled. . . . . . . . . . . : No\n      Autoconfiguration Enabled . . . . : Yes\n\n   Tunnel adapter Local Area Connection* 11:\n\n      Media State . . . . . . . . . . . : Media disconnected\n      Connection-specific DNS Suffix  . :\n      Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface\n      Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0\n      DHCP Enabled. . . . . . . . . . . : No\n      Autoconfiguration Enabled . . . . : Yes\n\n   Tunnel adapter isatap.{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}:\n\n      Media State . . . . . . . . . . . : Media disconnected\n      Connection-specific DNS Suffix  . :\n      Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4\n      Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0\n      DHCP Enabled. . . . . . . . . . . : No\n      Autoconfiguration Enabled . . . . : Yes\n\n   C:\\Users\\roadrunner\u003e\n\n\n**That's all folks!**\n\n\n.. _Python: http://www.python.org/\n.. _pywinrm: http://www.github.com/diyan/pywinrm/\n.. _prompt_toolkit: http://www.github.com/jonathanslenders/python-prompt-toolkit/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fptwinrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocoutinho%2Fptwinrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fptwinrm/lists"}