Remote PowerShell over WMI
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
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rpsowmi-2017.4.11.zip | 10.4 kB | Without provenance | Details for rpsowmi-2017.4.11.zip |
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 |
Security for rpsowmi 2017.4.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.