Skip to main content

Remote PowerShell over WMI (RPSoWMI)

Project description

Remote PowerShell over WMI (RPSoWMI) enables you to run PowerShell code with support of STDIN, STDOUT, STDERR and return code through Windows Management Instrumentation (WMI) on remote host.

Communication with your PowerShell code is done through 2 named pipes (one for outbound and another for inbound) being created on executor’s machine, that means your access rights must be enough privileged not only for creation of new process on remote machine but also for access to the named pipes on executor’s machine from remote machine.

How to use RPSoWMI:

from rpsowmi import RemotePowerShellOverWmi as RPSoWMI
from wmi import WMI  # https://pypi.python.org/pypi/WMI/

rps = RPSoWMI(WMI())
r = rps.execute("Write-Host 'Hello, world'")
print(r.stdout)  # Just showing 'Hello, world'.

For more details, read pydoc of rpsowmi.RemotePowerShellOverWmi.

Known problems

  • Length of your PowerShell code is limited up to around 2,800 characters because the code is tranfered as a part of command line arguments.

  • Line separators - CR, LF and CRLF are unified to LF (\n) somewhere in communication between RPSoWMI and your PowerShell code.

  • Line separator - LF (\n) may be appended to STDOUT and STDERR even though your PowerShell code doesn’t do it.

Version history

  • v2017.4.11: Initial release.

Links

Build status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpsowmi-2017.4.11.zip (10.4 kB view details)

Uploaded Source

File details

Details for the file rpsowmi-2017.4.11.zip.

File metadata

  • Download URL: rpsowmi-2017.4.11.zip
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpsowmi-2017.4.11.zip
Algorithm Hash digest
SHA256 011c97f20235578c4fc827110c5b93092b36db63cb52cd816d1a47e5840b399e
MD5 fe6bd1688592e295f928643984ca7cfc
BLAKE2b-256 9aa642566e0ae808d22f4f62d635cb75c76bd959829836d9d8aa4335542b8589

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page