SCCM 2007 report by collection using powershell

I'm trying to make a a power shell script out of this query so I can logs for a particular collection and move them directly to a text file. 

Select stat.*, ins.*, att2.* from SMS_StatusMessage as stat left outer join SMS_StatMsgInsStrings as ins on stat.recordid = ins.recordid left outer join SMS_StatMsgAttributes as att1 on stat.recordid = att1.recordid inner join SMS_StatMsgAttributes as att2 on stat.recordid = att2.recordid  WHERE ((att1.AttributeID=000 AND att1.AttributeValue="YYYY")) AND (SiteCode="XXX") order by att2.AttributeTime Desc

June 30th, 2015 11:39am

Data in that class does not contain a foreign key for anything identifying a resource (or collection) so there is no way to do this directly. MachineName may sometimes be able to be used, it depends upon the status message though.

Not sure what benefit this would actually be though.

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 1:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics