Here is a quick example how to install new Configuration Manager Distribution Point with PowerShell. As you see we have many options to expand this script. We can install Windows Server features, reboot it remotely, install additional software etc. It all depends how you wanna install and configure it.
#Import the Module
Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1")
$SiteCode = Get-PSDrive -PSProvider CMSITE
#Change the connection context
Set-Location "$($SiteCode.Name):\"
#New DP Information
$DistributionPoint = ‘DP01.4demo4.com’
$SiteCode = ‘PS1’
# Test the connection to server
Test-Connection `
-ComputerName $DistributionPoint
# OPTIONAL – Install Windows Server Roles and Features
Install-WindowsFeature `
-Name Web-ISAPI-Ext,Web-Windows-Auth,Web-Metabase,Web-WMI,RDC `
-ComputerName $DistributionPoint
# OPTIONAL – Restart the Server
Restart-Computer `
-ComputerName $DistributionPoint `
-Wait `
-For PowerShell `
-Force
# Add new Site System Server
New-CMSiteSystemServer `
-ServerName $DistributionPoint `
-SiteCode $SiteCode
# Add a Distribution Point
Add-CMDistributionPoint `
-SiteSystemServerName $DistributionPoint `
-SiteCode $SiteCode `
-ClientConnectionType Intranet `
-MinimumFreeSpaceMB 50 `
-PrimaryContentLibraryLocation Automatic `
-SecondaryContentLibraryLocation Automatic `
-PrimaryPackageShareLocation Automatic `
-EnablePxeSupport `
-SecondaryPackageShareLocation Automatic `
-CertificateExpirationTimeUtc ((Get-Date).AddYears(100))
# Modify the DP
Set-CMDistributionPoint `
-SiteSystemServerName $DistributionPoint `
-SiteCode $SiteCode `
-ClientCommunicationType HTTP
#Additional steps here
#Monitor DP Intallation
#Distribute Content
Merry Christmas
Another suggestion would be to assign the boundary group to the DP.
Yep. If I didnt miss anything, then currently we dont have a cmdlet for that. here is the example that you are looking for – http://cm12sdk.net/?p=511
Best,
Kaido
If you make a function parameter for boundary group you can pass it as parameter
Set-CMDistributionPoint -SiteSystemServerName $NewServerName -SiteCode $NewServerSite -AddBoundaryGroupName $BoundaryGroupName -AllowFallbackForContent $false -EnableValidateContent $true -EnableBranchCache $true
[…] Pour accéder au script et avoir plus d'informations: http://blog.coretech.dk/kaj/roll-out-new-configuration-manager-distribution-point-with-powershell/ […]