I would like to do something like this, but currently this wrapper does not seem to accept sys.argv[1] to set variables. I tried with quotes and without quotes, the script just hangs. When I hard code the host variable, it works without issue.
import sys
import wmi_client_wrapper as wmi
wmic = wmi.WmiClientWrapper(
username="JIMBOB",
password="PASSWORD",
host="sys.argv[1]",
)
output = wmic.query("select FreeSpace from Win32_LogicalDisk where DeviceID='C:'")
print(output)
I even tried to use an input function to ask for host, but it doesn't like that either.
I would like to do something like this, but currently this wrapper does not seem to accept sys.argv[1] to set variables. I tried with quotes and without quotes, the script just hangs. When I hard code the host variable, it works without issue.
I even tried to use an input function to ask for host, but it doesn't like that either.