Hi,
We are trying to automate the provisioning of our DistributionPoints using Orchestrator - no worries here.
The issue we have is with the Add-CMDistributionPoint cmdlet in a PKI environment.
Using the this code snippet:
$site = CMSite $ssPXEPwd = 'pxepassword' | ConvertTo-SecureString -AsPlainText -Force $ssCERTPwd = 'strongcertpassword' | ConvertTo-SecureString -AsPlainText -Force $DPCertPath = 'localpathtocertificate' $DPServer = 'DP_FQDN' $siteCode = $site.SiteCode $NewDP = Add-CMDistributionPoint -SiteSystemServerName $DPServer -SiteCode $siteCode -CertificatePath $DPCertPath -CertificatePassword $ssCERTPwd -MinimumFreeSpaceMB 5000 -AllowPreStaging -PrimaryContentLibraryLocation "M" -PrimaryPackageShareLocation "M" -EnablePXESupport -AllowRespondIncomingPxeRequest -EnableUnknownComputerSupport -ComputersUsePxePassword $ssPXEPwd -EnableMulticast -EnableValidateContent
We can deploy the first Distribution Point fine, but subsequent DP's fail with this error:
WARNING: The certificate you specified is already in use. Are you sure you want to use this certificate? Add-CMDistributionPoint : Validation of input parameters failed. Cannot continue. At line:1 char:1 + Add-CMDistributionPoint -SiteSystemServerName $DPServer -SiteCode $siteCode -Cer ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Confi...ionPointCommand:AddDistributionPointCommand) [Add-CM DistributionPoint], InvalidOperationException + FullyQualifiedErrorId : ValidationError,Microsoft.ConfigurationManagement.Cmdlets.HS.Commands.AddDistributionPoi ntCommand
If you perform the same operation in the console, you also get prompted, but at least you can continue past the dialog.
Is there a way to do this with the cmdlet? I don't want to have to create 250 certificates for the DP's! If we delete the cert from the console (DB) then we can re-run the command no worries.
Thanks