@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.