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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
psprocsdict-0.10-py3-none-any.whl
(21.8 kB
view hashes)
Close
Hashes for psprocsdict-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa8ae5e512d00753b12d160a6550e742ae01c059bc08c89118c08b17ac91c05 |
|
MD5 | be86d5caa32059b22522826cefac60e0 |
|
BLAKE2b-256 | d412c382b72f9b30bc6489fdde151e24dc383a1b07daddcaac4618ebf054e6c0 |