Jump to content


OC48

Get Distribution Point Content list

Recommended Posts

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.post-31218-0-44454900-1441811946.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.