Remove-CMSecondarySite

Removes a secondary site from Configuration Manager.

Syntax

Remove-CMSecondarySite
      -Action <ActionType>
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -InputObject <IResultObject>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMSecondarySite -Action  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -Name  [-WhatIf] []
Remove-CMSecondarySite -Action  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -SiteCode  [-WhatIf] []

Description

The Remove-CMSecondarySite cmdlet removes a secondary site from Microsoft System Center 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.

Examples

Example 1: Remove a secondary site upgrade by using a site name

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

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

Required Parameters

-Action

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.
Type:ActionType
Parameter Sets:Uninstall, Delete
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

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

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of a secondary site.

Type:String
Aliases:SiteName
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteCode

Specifies a code for a secondary site.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False