Share via


New-CMSecondarySite

New-CMSecondarySite

Creates a secondary site in Configuration Manager.

Syntax

Parameter Set: NewDistributionPointByHTTPAndCreateCertificate
New-CMSecondarySite -CertificateExpirationTimeUtc <DateTime> -CreateSelfSignedCertificate -Http -InstallationSourceFile <IResultObject[]> -InstallInternetServer <Boolean> -ParentSiteCode <String> -ServerName <String> -SiteCode <String> -SiteName <String> -SqlServerSetting <IResultObject[]> [-AllowFallbackForContent <Boolean> ] [-AllowPreStaging <Boolean> ] [-BoundaryGroups <IResultObject[]> ] [-ContentMonitoringPriority <Priority> {High | Highest | Low | Lowest | Medium} ] [-EnableAnonymous <Boolean> ] [-InstallationFolder <String> ] [-MinFreeSpaceMB <Int32> ] [-PrimaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-PrimaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-SecondaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-SecondaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-ValidateContentSchedule <IResultObject> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewDistributionPointByHTTPAndImportCertificate
New-CMSecondarySite -CertificatePassword <SecureString> -CertificatePath <String> -Http -ImportCertificate -InstallationSourceFile <IResultObject[]> -InstallInternetServer <Boolean> -ParentSiteCode <String> -ServerName <String> -SiteCode <String> -SiteName <String> -SqlServerSetting <IResultObject[]> [-AllowFallbackForContent <Boolean> ] [-AllowPreStaging <Boolean> ] [-BoundaryGroups <IResultObject[]> ] [-ContentMonitoringPriority <Priority> {High | Highest | Low | Lowest | Medium} ] [-EnableAnonymous <Boolean> ] [-ForceWhenDuplicateCertificate <Boolean> ] [-InstallationFolder <String> ] [-MinFreeSpaceMB <Int32> ] [-PrimaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-PrimaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-SecondaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-SecondaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-ValidateContentSchedule <IResultObject> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewDistributionPointByHTTPSAndCreateCertificate
New-CMSecondarySite -CertificateExpirationTimeUtc <DateTime> -CreateSelfSignedCertificate -Https -InstallationSourceFile <IResultObject[]> -InstallInternetServer <Boolean> -ParentSiteCode <String> -ServerName <String> -SiteCode <String> -SiteName <String> -SqlServerSetting <IResultObject[]> [-AllowFallbackForContent <Boolean> ] [-AllowPreStaging <Boolean> ] [-BoundaryGroups <IResultObject[]> ] [-ClientConnectionType <ClientConnectionTypes> {Internet | InternetAndIntranet | Intranet} ] [-ContentMonitoringPriority <Priority> {High | Highest | Low | Lowest | Medium} ] [-InstallationFolder <String> ] [-MinFreeSpaceMB <Int32> ] [-PrimaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-PrimaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-SecondaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-SecondaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-ValidateContentSchedule <IResultObject> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewDistributionPointByHTTPSAndImportCertificate
New-CMSecondarySite -CertificatePassword <SecureString> -CertificatePath <String> -Https -ImportCertificate -InstallationSourceFile <IResultObject[]> -InstallInternetServer <Boolean> -ParentSiteCode <String> -ServerName <String> -SiteCode <String> -SiteName <String> -SqlServerSetting <IResultObject[]> [-AllowFallbackForContent <Boolean> ] [-AllowPreStaging <Boolean> ] [-BoundaryGroups <IResultObject[]> ] [-ClientConnectionType <ClientConnectionTypes> {Internet | InternetAndIntranet | Intranet} ] [-ContentMonitoringPriority <Priority> {High | Highest | Low | Lowest | Medium} ] [-ForceWhenDuplicateCertificate <Boolean> ] [-InstallationFolder <String> ] [-MinFreeSpaceMB <Int32> ] [-PrimaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-PrimaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-SecondaryContentLibraryLocation <DriveType> {A | Automatic | 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} ] [-SecondaryPackageShareLocation <DriveType> {A | Automatic | 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} ] [-ValidateContentSchedule <IResultObject> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-CMSecondarySite cmdlet creates a secondary site in Microsoft System Center 2012 SP1 Configuration Manager.

Parameters

-AllowFallbackForContent<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AllowPreStaging<Boolean>

Indicates whether the secondary site can pre-stage contents.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-BoundaryGroups<IResultObject[]>

Specifies an array of boundary group objects. To get a boundary group object, use the Get-CMBoundaryGroup cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CertificateExpirationTimeUtc<DateTime>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CertificatePassword<SecureString>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CertificatePath<String>

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ClientConnectionType<ClientConnectionTypes>

Specifies a client connection type. The acceptable values for this parameter are:

-- Internet
-- InternetAndIntranet
-- Intranet

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ContentMonitoringPriority<Priority>

Specifies content monitoring priority. The acceptable values for this parameter are:

-- High
-- Highest
-- Low
-- Lowest
-- Medium

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CreateSelfSignedCertificate

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableAnonymous<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ForceWhenDuplicateCertificate<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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. This option does not support mobile devices or computers running Mac OS.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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. This option does not support mobile devices or computers running Mac OS.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ImportCertificate

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InstallationFolder<String>

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

Aliases

InstallDir

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InstallationSourceFile<IResultObject[]>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InstallInternetServer<Boolean>

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MinFreeSpaceMB<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ParentSiteCode<String>

Specifies the site code of the primary site that is parent to the secondary site that the cmdlet creates.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PrimaryContentLibraryLocation<DriveType>

Specifies a primary content library location. The acceptable values for this parameter are:

-- Automatic.
-- Drive letter from A: through Z:.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PrimaryPackageShareLocation<DriveType>

Specifies a primary package share location. The acceptable values for this parameter are:

-- Automatic.
-- Drive letter from A: through Z:.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecondaryContentLibraryLocation<DriveType>

Specifies a secondary content library location. The acceptable values for this parameter are:

-- Automatic.
-- Drive letter from A: through Z:.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecondaryPackageShareLocation<DriveType>

Specifies a secondary package share location. The acceptable values for this parameter are:

-- Automatic.
-- Drive letter from A: through Z:.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ServerName<String>

Specifies a fully qualified domain name (FQDN) for the secondary site server.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCode<String>

Specifies the site code that uniquely identifies the secondary site in the hierarchy.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteName<String>

Specifies the site name that helps identify the secondary site.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SqlServerSetting<IResultObject[]>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ValidateContentSchedule<IResultObject>

Specifies an object that represents a schedule type and determines how frequently System Center 2012 Configuration Manager validates the integrity of packages on the distribution point.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create a secondary site

This first command creates a SQL Server settings object and 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.

PS C:\> $CIObj = New-CMSqlServerSetting -CopySqlServerExpressOnSecondarySite
PS C:\> 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

New-CMInstallationSourceFile

New-CMSqlServerSetting

Remove-CMSecondarySite