Edit

Share via


New-CMSecondarySite

Create a secondary site.

Syntax

NewDistributionPointByHTTPAndCreateCertificate (Default)

New-CMSecondarySite
    -CertificateExpirationTimeUtc <DateTime>
    -InstallationSourceFile <IResultObject[]>
    -SecondarySiteCode <String>
    -ServerName <String>
    -SiteName <String>
    -SqlServerSetting <IResultObject[]>
    [-AllowFallbackForContent <Boolean>]
    [-AllowPreStaging <Boolean>]
    [-BoundaryGroup <IResultObject[]>]
    [-ContentMonitoringPriority <Priority>]
    [-CreateSelfSignedCertificate]
    [-EnableAnonymous <Boolean>]
    [-EnableBranchCache]
    [-Http]
    [-InstallationFolder <String>]
    [-InstallInternetServer <Boolean>]
    [-MinFreeSpaceMB <Int32>]
    [-PrimaryContentLibraryLocation <DriveType>]
    [-PrimaryPackageShareLocation <DriveType>]
    [-PrimarySiteCode <String>]
    [-SecondaryContentLibraryLocation <DriveType>]
    [-SecondaryPackageShareLocation <DriveType>]
    [-ValidateContentSchedule <IResultObject>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NewDistributionPointByHTTPSAndCreateCertificate

New-CMSecondarySite
    -CertificateExpirationTimeUtc <DateTime>
    -InstallationSourceFile <IResultObject[]>
    -SecondarySiteCode <String>
    -ServerName <String>
    -SiteName <String>
    -SqlServerSetting <IResultObject[]>
    [-AllowFallbackForContent <Boolean>]
    [-AllowPreStaging <Boolean>]
    [-BoundaryGroup <IResultObject[]>]
    [-ClientConnectionType <ClientConnectionTypes>]
    [-ContentMonitoringPriority <Priority>]
    [-CreateSelfSignedCertificate]
    [-EnableBranchCache]
    [-Https]
    [-InstallationFolder <String>]
    [-InstallInternetServer <Boolean>]
    [-MinFreeSpaceMB <Int32>]
    [-PrimaryContentLibraryLocation <DriveType>]
    [-PrimaryPackageShareLocation <DriveType>]
    [-PrimarySiteCode <String>]
    [-SecondaryContentLibraryLocation <DriveType>]
    [-SecondaryPackageShareLocation <DriveType>]
    [-ValidateContentSchedule <IResultObject>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NewDistributionPointByHTTPSAndImportCertificate

New-CMSecondarySite
    -CertificatePassword <SecureString>
    -CertificatePath <String>
    -InstallationSourceFile <IResultObject[]>
    -SecondarySiteCode <String>
    -ServerName <String>
    -SiteName <String>
    -SqlServerSetting <IResultObject[]>
    [-AllowFallbackForContent <Boolean>]
    [-AllowPreStaging <Boolean>]
    [-BoundaryGroup <IResultObject[]>]
    [-ClientConnectionType <ClientConnectionTypes>]
    [-ContentMonitoringPriority <Priority>]
    [-EnableBranchCache]
    [-ForceWhenDuplicateCertificate <Boolean>]
    [-Https]
    [-ImportCertificate]
    [-InstallationFolder <String>]
    [-InstallInternetServer <Boolean>]
    [-MinFreeSpaceMB <Int32>]
    [-PrimaryContentLibraryLocation <DriveType>]
    [-PrimaryPackageShareLocation <DriveType>]
    [-PrimarySiteCode <String>]
    [-SecondaryContentLibraryLocation <DriveType>]
    [-SecondaryPackageShareLocation <DriveType>]
    [-ValidateContentSchedule <IResultObject>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NewDistributionPointByHTTPAndImportCertificate

New-CMSecondarySite
    -CertificatePassword <SecureString>
    -CertificatePath <String>
    -InstallationSourceFile <IResultObject[]>
    -SecondarySiteCode <String>
    -ServerName <String>
    -SiteName <String>
    -SqlServerSetting <IResultObject[]>
    [-AllowFallbackForContent <Boolean>]
    [-AllowPreStaging <Boolean>]
    [-BoundaryGroup <IResultObject[]>]
    [-ContentMonitoringPriority <Priority>]
    [-EnableAnonymous <Boolean>]
    [-EnableBranchCache]
    [-ForceWhenDuplicateCertificate <Boolean>]
    [-Http]
    [-ImportCertificate]
    [-InstallationFolder <String>]
    [-InstallInternetServer <Boolean>]
    [-MinFreeSpaceMB <Int32>]
    [-PrimaryContentLibraryLocation <DriveType>]
    [-PrimaryPackageShareLocation <DriveType>]
    [-PrimarySiteCode <String>]
    [-SecondaryContentLibraryLocation <DriveType>]
    [-SecondaryPackageShareLocation <DriveType>]
    [-ValidateContentSchedule <IResultObject>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-CMSecondarySite cmdlet creates a secondary site. For more information, see Prepare to install Configuration Manager sites.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Create a secondary site

This first command creates a SQL Server settings object. This object specifies that Microsoft SQL Server Express is copied to a Configuration Manager secondary site. The command stores the object in the $CIObj variable.

The second command creates a secondary site named Contoso remote site that has the site code CM2 on the server named server2.corp.contoso.com. The command specifies the SQL Server settings object for the secondary sited stored in $CIObj. The command specifies the primary site for the secondary site that has the site code CM1.

$CIObj = New-CMSqlServerSetting -CopySqlServerExpressOnSecondarySite

New-CMSecondarySite -CertificateExpirationTimeUtc "2/1/2020 12:00 AM" -CreateSelfSignedCertificate -Https -InstallationSourceFile "\\ContosoServer1\SourceFiles" -InstallInternetServer $True -ParentSiteCode "CM1" -ServerName "server2.corp.contoso.com" -SiteCode "CM2" -SiteName "Contoso remote site" -SqlServerSetting $CIObj

Parameters

-AllowFallbackForContent

Indicates whether clients can use a fallback source location for content.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AllowPreStaging

Indicates whether the secondary site can prestage content.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BoundaryGroup

Specify an array of boundary group objects for this site system. To get this object, use the Get-CMBoundaryGroup cmdlet.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:BoundaryGroups

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificateExpirationTimeUtc

Specifies the date and time at which the self-signed certificate expires for a distribution point on the secondary site.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPSAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificatePassword

Specifies the password for the PKI imported certificate for the distribution point.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificatePath

Specifies the import path for the PKI issued certificate that the distribution point uses. This parameter applies when the secondary site has installed and configured IIS to create a distribution point.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ClientConnectionType

Specifies the client connection type.

Parameter properties

Type:ClientConnectionTypes
Default value:None
Accepted values:Intranet, Internet, InternetAndIntranet
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndCreateCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ContentMonitoringPriority

Specifies the content monitoring priority.

Parameter properties

Type:Priority
Default value:None
Accepted values:Lowest, Low, Medium, High, Highest
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreateSelfSignedCertificate

Indicates that the secondary site creates a self-signed certificate for the distribution point.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPSAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableAnonymous

Indicates whether client computers communicate anonymously with the distribution point. This parameter applies when the secondary site has installed and configured IIS to create a distribution point.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPAndCreateCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableBranchCache

Indicates that clients that use Windows BranchCache are allowed to download content from an on-premises distribution point.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWhenDuplicateCertificate

Indicates whether Configuration Manager overwrites a duplicate certificate when you import a PKI client certificate for the secondary site.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Http

Indicates that client computers communicate with the distribution point by using HTTP. This parameter applies when the secondary site has installed and configured IIS to create a distribution point. \

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Https

Indicates that client computers communicate with the distribution point by using HTTPS. This parameter applies when the secondary site has installed and configured IIS to create a distribution point.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndCreateCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ImportCertificate

Indicates that the cmdlet imports a PKI certificate instead of using a self-signed certificate for the distribution point.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewDistributionPointByHTTPSAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewDistributionPointByHTTPAndImportCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstallationFolder

Specifies the installation folder on the secondary site server where the cmdlet installs the site files.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:InstallDir

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstallationSourceFile

Specifies an array of installation source file objects for Configuration Manager. To get this object, use the New-CMInstallationSourceFile cmdlet.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstallInternetServer

Specifies whether to install and configure IIS if Configuration Manager requires it. This parameter must be $True before the cmdlet installs the site system role for the distribution point on the secondary site.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinFreeSpaceMB

Specifies the amount of space, in megabytes, to reserve on each drive that the distribution point uses. This value determines the remaining free space on the drive after the distribution stores content on the drive.

Starting in version 2107, the default minimum free space changed from 200 MB to 500 MB.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryContentLibraryLocation

Specifies a primary content library location.

Parameter properties

Type:DriveType
Default value:None
Accepted values:Automatic, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryPackageShareLocation

Specifies a primary package share location.

Parameter properties

Type:DriveType
Default value:None
Accepted values:Automatic, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimarySiteCode

Specify the three-character site code of the parent site.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ParentSiteCode

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondaryContentLibraryLocation

Specifies a secondary content library location.

Parameter properties

Type:DriveType
Default value:None
Accepted values:Automatic, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondaryPackageShareLocation

Specifies a secondary package share location.

Parameter properties

Type:DriveType
Default value:None
Accepted values:Automatic, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecondarySiteCode

Specify a unique three-character site code for the secondary site.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SiteCode

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerName

Specify the fully qualified domain name (FQDN) of the server to use as the secondary site server.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteName

Specifies the site name that helps identify the secondary site.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlServerSetting

Specifies an array of SQL Server settings object in Configuration Manager. To get this object, use the New-CMSqlServerSetting cmdlet.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ValidateContentSchedule

Specifies an object that represents a schedule type. It determines how frequently Configuration Manager validates the integrity of packages on the distribution point. To create a schedule token object, use the New-CMSchedule cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

IResultObject

IResultObject

IResultObject

IResultObject

Notes

For more information on this return object and its properties, see SMS_SCI_SysResUse server WMI class.