The module he imports is from the 2012 client, and the 'CM' CMDlets are built 
for SCCM 2012 that stem from new DLLs shipped with the admin console.

Short answer is it won't work in 2007.

Travis

From: [email protected] [mailto:[email protected]] On 
Behalf Of Rickym61
Sent: Friday, March 07, 2014 10:13
To: [email protected]
Subject: [mssms] Re: Script to create DP group from a list?

Thanks Trevor, will this work with SCCM 2007?

On Friday, 7 March 2014, Trevor Sullivan 
<[email protected]<mailto:[email protected]>> wrote:
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: 
[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>
 
[mailto:[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>]
 On Behalf Of Rickym61
Sent: Friday, March 7, 2014 9:06 AM
To: 
[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>
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=configmgrsdk

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.




CONFIDENTIALITY NOTICE:
This message is intended for the use of the individual or entity to which it is 
addressed and may contain information that is privileged, confidential and 
exempt from disclosure under applicable law. If the reader of this message is 
not the intended recipient or the employee or agent responsible for delivering 
this message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify us 
immediately by email reply.





Reply via email to