shouldn't this work?
$this = "select * from win32_service where name='WinRM'"
Get-WmiObject -Query $this
I need to build a query string by supplying a variable. I've tried various ways to include the varible in the parameter following -Query, but nothing works. Now I'm trying to use the variable to build the string I'd like to use with -Query. Nothing but errors so far, and they aren't helpful error messages.