-2

Could you advise how could I run query ID using command prompt? For example, I do not want to go to Monitoring-Queries-expand tree and search for the specific querry. I Just want to have script file, when I launch it the command show the result of my query or export it to csv file. What is the syntaxis if I should go to File - connect via Windows Poweshell?

MS SCCM 2012 console version 5 site version 5

1
  • Your question's 'Title' should contain the question. The info in your title should be in the body. I think you are asking "How do I monitor queries in SCCM using Powershell?"
    – Jeter-work
    May 11, 2017 at 16:07

1 Answer 1

1

Do you mean that you want to use PowerShell to run a CM Query? Then you can use built-in cmdlet:

Invoke-CMQuery -Name 'YourQueryName'

To get the detailed syntax of Invoke-CMQuery command, you can run below:

Get-Help Invoke-CMQuery

The output is different with running from GUI, however, you may still be able to use PowerShell to change the output style.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .