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 3:22pm

Thanks for the reply Peter.

Yes, you're right.

I was able to get it to work using:

Set-CMDistributionPoint -Name {Site Server Name} -SecurityScopeAction AddMembership -SecurityScopeName {Name of Security Scope}

However, I receive the following message:

WARNING: Configuring security scopes through this cmdlet has been deprecated. To configure security scopes for an object, Set-CMObjectSecurityScope should be used instead.

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 10:36am

It's just a warning. Ignore it if it worked. 
September 3rd, 2015 10:44am

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

Other recent topics Other recent topics