Try this:
# List of Distribution Point server names $DPList = @('sccm01', 'sccm01', 'sccm01'); # Define the Distribution Point Group Name $DPGroupName = 'Test'; # Import the ConfigMgr PowerShell module Import-Module -Name 'D:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'; # Set the PowerShell location to the CMSite PSDrive Set-Location -Path ('{0}:' -f (Get-PSDrive -PSProvider CMSite).Name); # Create the Distribution Point Group $DPGroup = New-CMDistributionPointGroup -Name $DPGroupName -Description 'Created by PowerShell'; # Resolve each hostname to FQDN and add to Distribution Point Group foreach ($DP in $DPList) { # Resolve the hostname to FQDN $DP = Resolve-DnsName -Name $DP; Add-CMDistributionPointToGroup -DistributionPointName $DP -DistributionPointGroupName $DPGroupName; } Cheers, Trevor Sullivan From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Rickym61 Sent: Friday, March 7, 2014 9:06 AM To: mssms@lists.myitforum.com Subject: [mssms] Script to create DP group from a list? Hi All, has anyone out there got a script that will create a DP group based on a list of servers? ive seen this but go no idea how to adapt it to acheive the below. http://social.technet.microsoft.com/Forums/systemcenter/en-US/15aef073-91ed- 4b38-bcce-87019a1984e0/script-for-distribution-point-group?forum=configmgrsd k We already have a few groups for DP's but need one a few more so they are for a selected SMSPXEIMAGE$ DP too, its a bit of pain having to go into the associated DP for the server and tick theSCCM 2007 is the enviroment, SMSPXEImage one too :( thanks in advance.