CMCB Agent - how to retrieve most recently used MP and DP info through PowerShell

Steve D' Souza 21 Reputation points
2021-05-07T07:40:44.12+00:00

Hello,

I need to retrieve the information about the most recently used MP and DPs by a CMCB agent. Is it possible to query the client CCM WMI repo to achieve this? Thanks

Steve

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

Accepted answer
  1. Jason Sandys 31,411 Reputation points Microsoft Employee Moderator
    2021-06-29T13:29:52.737+00:00

    so relatively static DP

    Perhaps. It depends on the content as well because if the content doesn't exist on a specific DP, the client will attempt to use a different DP for that specific content and thus this may not be indicative of other content. I don't think this is an unreasonable path, but just keep this caveat in mind.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Jason Sandys 31,411 Reputation points Microsoft Employee Moderator
    2021-05-07T15:09:37.64+00:00

    MP, yes as that's more or less static (although it can update). DP, no, not directly, as every content lookup results in a query for which DP to use so there's no explicit value in recording that info client side.

    What problem are you attempting to address by "tracking" this info?

    Did you know you can see the current MP a client is using in the console already?

    0 comments No comments

  2. Amandayou-MSFT 11,156 Reputation points
    2021-05-10T07:29:17.577+00:00

    Hi @Steve D' Souza

    Yes, agree with Jason, we could check the tab of Management Point on the side of console.

    Please navigate to the Devices -> Right-click the tab of Management Point, kindly refer to the following screenshot:

    95194-510.png

    And about the DP, when client want to use DP to download the content, the MP will give the list of DP, the client will find the DP according to boundary group and logical relationship. As Jason says, querying DP makes no sense.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Steve D' Souza 21 Reputation points
    2021-06-29T09:24:04.323+00:00

    @Jason Sandys Apologies for the late reply. I struggle a little finding my way around the new technet forum site.

    As regards your question, this is for our automated custom SQL 2017 cluster patching solution using PowerShell, remotely triggered using CCM SDK from an enterprise scheduler server (patches deployed as 'Available'). It would be nice to have this MP/DP info in our patching pre-req reporting solution before the actual day of patching. Hence thought of asking. Being able to see the last used MP and DP (and the timestamp of their recent activities) gives us additional level of confidence to see if there would be any issues with CMCB backend connectivity on the patching day.

    I finally managed to find the MP name/activity from the Root\ccm\locationservices\SMS_MPInformation class where as for DP I ended up scraping ContentTransferManager*.log ( to look for the first occurrence of the text "started download from" bottom up).

    I know DP is not reliable in this case but I look for the DP used to download the last package (i.e. the last recorded download activity). As this solution is for server patching, all the target CMCB agent nodes are in data centre, so relatively static DP and MP (I guess).

    @Amandayou-MSFT - thanks for your input.

    Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.