OC48 Posted September 9, 2015 Report post Posted September 9, 2015 I am familiar with Powershell but find the CM2012 cmdlets to be quite lacking. Being as my WMI querying skills are not that strong, I am looking for help in writing a Powershell WMI query (or script, if necessary) to get a list of content on a distribution point group. I can see it in the GUI, so I know it's there. I just can't figure out how to get it into a manageable list text format. I would like it to contain the following fields: Name,Type,Size (MB),Package ID. Any help would be greatly appreciated. Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted September 9, 2015 Report post Posted September 9, 2015 A good trick to start with is using the SMSProv.log file. That log file logs all the SMS Provider activity, which includes your actions through the console. So, open the log file and the console and open de content tab of a distribution group. Quote Share this post Link to post Share on other sites More sharing options...
OC48 Posted September 9, 2015 Report post Posted September 9, 2015 Peter, Thank you for your reply as this is truly useful information that I did not previously know. Unfortunately, nothing is logged when I click on the content tab. It logs up to the point that I open the properties dialog box of the DP group, but stops thereafter. Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted September 10, 2015 Report post Posted September 10, 2015 Yeah, it looks like it runs all the queries when the properties are opened. This seems to be be the WMI query: SELECT * FROM SMS_DPGroupContentInfo WHERE GroupID="". Another tip would be to look at the a WMI Explorer. This is an easy way to browse through WMI and find the properties that you need. Quote Share this post Link to post Share on other sites More sharing options...
OC48 Posted September 11, 2015 Report post Posted September 11, 2015 Thank you, this is exactly what I needed to get the information! I am including the Powershell query that worked for me in case it is of help to anybody else: Get-WmiObject -ComputerName SCCMSERVER -Namespace "root/SMS/site_AAA" -Query "SELECT * FROM SMS_DPGroupContentInfo WHERE GroupID='{DP Group GUID}'" | Sort Name | Format-Table -Property Name,@{n='Size (MB)';e={$_.SourceSize / 1KB -as [int]}},PackageID -Wrap Quote Share this post Link to post Share on other sites More sharing options...