1

I want to get the site system servers associated with a boundary group in SSCM using Powershell.

There is a commandlet Get-CMDistributionPoint however there is no parameter to specify a boundary group.

1

My answer may not be the best but can show what you want:

First, you need to use PowerShell to connect to CM site:

Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" # Import the ConfigurationManager.psd1 module 
Set-Location "CTS:" # Set the current location to be the site code.

Or you can just click below:

enter image description here

Code here to get what you want:

$BoundaryGroup = Get-CMBoundaryGroup -Name 'Test'
Get-WmiObject -Namespace root\sms\site_cts -Class SMS_BoundaryGroupSiteSystems | where {$_.groupid -eq $boundarygroup.GroupID} | select servernalpath, sitecode 

Replace Test to your boundary group name. You can output any properties in Select

Attention: You need to run the PowerShell lines on your site server because root\sms\site_cts is a WMI Namespace on your site server (CTS is site code).

5
  • I get an invalid namespace error even though I put in the correct site code. – David Klempfner Feb 20 '17 at 6:30
  • the WMI namespace root\sms\site_<sitecode> is on your site server, thus you need to run the PowerShell commands on your site sierver. Or you can make a remote session by add -Computername. For example: Get-WmiObject -ComputerName CAS -Namespace root\sms\site_cts -Class sms_boundarygroupsitesystems | where {$_.groupid -eq $boundarygroup.GroupID} | select servernalpath, sitecode . I'll edit my answer. – Bifeng Dong - MSFT Feb 20 '17 at 7:11
  • Unfortunately I get RPC server unavailable. – David Klempfner Feb 21 '17 at 0:42
  • Basically, the PowerShell command is querying Server WMI Class link SMS_BoundaryGroupSiteSystems.. I use where to filter the specific boundary group you need. Run the lines on your Primary Site Server, replace the site code, it will certainly work. – Bifeng Dong - MSFT Feb 21 '17 at 1:40
  • Have you got it worked? Any help needed on this? – Bifeng Dong - MSFT Feb 26 '17 at 14:09
0

That's not supported with the current Powershell commandlets. Have you considered using a custom SSRS report such as https://gallery.technet.microsoft.com/SCCM-2012-SSRS-report-7570a001 instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.