Jul-26-2022, 11:09 AM
I have a powershell command to run it with winrm.
result = session.run_ps('get-wmiobject -namespace root\SecurityCenter2 -computername localhost -Query "Select * from AntiVirusProduct"')I want to give this part of command as a variable :
"Select * from AntiVirusProduct"like :
query = "Select * from AntiVirusProduct" result = session.run_ps('get-wmiobject -namespace root\SecurityCenter2 -computername localhost -Query[b] query[/b]')How can i do it?