Remove-CMSecondarySite

Remove-CMSecondarySite

Removes a secondary site from Configuration Manager.

Syntax

Parameter Set: SearchBySiteCodeMandatory
Remove-CMSecondarySite -Action <ActionType> {Delete | Uninstall} -SiteCode <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Remove-CMSecondarySite -Action <ActionType> {Delete | Uninstall} -Name <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMSecondarySite -Action <ActionType> {Delete | Uninstall} -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-CMSecondarySite cmdlet removes a secondary site from Microsoft System Center 2012 SP1 Configuration Manager. A secondary site has no site database of its own. Instead it is connected to a primary site and sends client data to the primary site for storage.

Parameters

-Action<ActionType>

Specifies an action type for the deletion. The acceptable values for this parameter are:

-- Delete. Removes the reference to the secondary site from the database.
-- Uninstall. Removes the reference to the secondary site from the database and triggers an uninstall action at the secondary site server.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies a secondary site object. To obtain this object, use the New-CMSecondarySite cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a secondary site.

Aliases

SiteName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCode<String>

Specifies a code for a secondary site.

Aliases

none

Required?

true

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: Remove a secondary site upgrade by using a site name

This command deletes a secondary site named ClientSecSiteUpgrade03. Because the Force parameter is not specified, you must confirm the action before it is performed.

PS C:\> Remove-CMSecondarySite -Action Delete -SiteName "ClientSecSiteUpgrade03"

Invoke-CMSecondarySiteUpgrade

New-CMSecondarySite