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.
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.
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:
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).
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?