I'd like to be able to query the "status" of a Task Sequence in SCCM 2007. SCCM comes with some semi-sophisticated reporting, among which is one entitled History - Specific task sequence advertisements run on a specific computer. This report provides the most useful information that I know how to get. It's not perfect, but if I could at least get this much, I would be able to do what I want.
I'm attempting to do this with WMI/WQL from a remote client (my desktop), querying the site database server. We usually use Perl. For this particular application, I'd prefer to use Python, but I'd take anything I could get at the moment.
Sadly, the report uses the view v_TaskExecutionStatus, and views are not (to my knowledge) available via WMI/WQL. Upon inspection of the view (on the database server itself), I see that it references the table dbo.TaskExecutionStatus. I can access this table using the DBI ODBC driver for SQL Server. Doing so circumvents the normal permissions used to protect the data on the server, and would not allow the script to be run by other users (without adding them to privileged groups outside the ones we're already using for the purpose of security).
Is there a way to access these DB tables via WMI/WQL? I don't see any reference to them when I edit a query in the SCCM console. Simple (SELECT * FROM X
) queries referring to TaskExecutionStatus (and the corresponding view) fail.
I cannot find any reference to the table/view in the SCCM 2007 SDK. My Internet queries have turned up little. Can anyone give me advice? Is there a way to find out what is available via WMI/WQL?
(I asked this on StackOverflow, too. It seemed appropriate here, too.)
0 Answers