Script to Add Scope to a DP Not Working

I have the following script to add a Security Scope to a DP, but it's not working (Props to Kaido Jrvemets).

Would appreciate any suggestions on how to correct it!

==============================================================

#Import Configuration Manager Module
Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1")
$SiteCode = Get-PSDrive -PSProvider CMSITE
Set-Location "$($SiteCode.Name):\"
 
#DP
$CMDP = Get-CMDistributionPoint -SiteSystemServerName {SiteServerName}
 
Set-CMObjectSecurityScope -InputObject $CMDP -Action AddMembership -Name {DP Group Name}

==============================================================

September 2nd, 2015 11:24am

It would be helpful if you would have mentioned an error message ... 
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 11:27am

Thanks for the reply Torsten.

There is no error message.

The script runs in PowerShell and returns to the prompt.

I only know it's not working because in the CM Admin console I can see that the scope hasn't been added to the DP. 

September 2nd, 2015 12:58pm

If you want to add a scope to a distribution point you can simply use Set-CMDistributionPoint with the SecurityScopeName parameter.
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 3:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics