Skip to main content

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

Metadata

Release files for rpsowmi 2017.4.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpsowmi 2017.4.11
File Size Uploaded
rpsowmi-2017.4.11.zip 10.4 kB Details

Release files / rpsowmi-2017.4.11.zip

Download URL rpsowmi-2017.4.11.zip
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
011c97f20235578c4fc827110c5b93092b36db63cb52cd816d1a47e5840b399e
BLAKE2b-256 checksum
How to use checksums
9aa642566e0ae808d22f4f62d635cb75c76bd959829836d9d8aa4335542b8589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2017.4.11 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page