Skip to main content

powershell/wmic to dict

Project description

powershell/wmic to dict

pip install psprocsdict

Tested against Windows 10 / Python 3.11 / Anaconda

from psprocsdict import get_dict_from_command

data = get_dict_from_command(
    cmd=f'powershell "Get-Process | Select-Object Name, Id, PriorityClass, HandleCount, WorkingSet, PagedMemorySize, PrivateMemorySize, VirtualMemorySize, PeakVirtualMemorySize, PeakPagedMemorySize, PeakWorkingSet | Format-Table *"',
    convert_dtypes_with_ast=True,
    format_powershell=False,
    cols=9999999,
    lines=1,
    sep=" ",
    percentage=100,
    stripspaces=True,
)


data2 = get_dict_from_command(
    cmd=f'powershell "Get-Process | Select-Object Name, Id, PriorityClass, HandleCount, WorkingSet, PagedMemorySize, PrivateMemorySize, VirtualMemorySize, PeakVirtualMemorySize, PeakPagedMemorySize, PeakWorkingSet | Format-Table *"',
    convert_dtypes_with_ast=False,
    format_powershell=False,
    cols=9999999,
    lines=1,
    sep=" ",
    percentage=100,
    stripspaces=True,
)

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

psprocsdict-0.10.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

psprocsdict-0.10-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file psprocsdict-0.10.tar.gz.

File metadata

  • Download URL: psprocsdict-0.10.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for psprocsdict-0.10.tar.gz
Algorithm Hash digest
SHA256 9e90a5b7ebe2224c46aafbfd74d7edf71deb952d02a3b15ddb80372582bcb1cf
MD5 908c3af1dced9fc8034949a09a71fc52
BLAKE2b-256 749e0bc911da14c1fc0ce3c4724192212731eb9ee8509ae33207aaee815d7b52

See more details on using hashes here.

File details

Details for the file psprocsdict-0.10-py3-none-any.whl.

File metadata

  • Download URL: psprocsdict-0.10-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for psprocsdict-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa8ae5e512d00753b12d160a6550e742ae01c059bc08c89118c08b17ac91c05
MD5 be86d5caa32059b22522826cefac60e0
BLAKE2b-256 d412c382b72f9b30bc6489fdde151e24dc383a1b07daddcaac4618ebf054e6c0

See more details on using hashes here.

Supported by

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