Remove-CMSiteSystemServer

Removes a site system server.

Syntax

Remove-CMSiteSystemServer
      [-Force]
      -InputObject <IResultObject>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSiteSystemServer
      [-SiteCode <String>]
      [-Force]
      [-SiteSystemServerName] <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMSiteSystemServer cmdlet removes a site system server from Configuration Manager. If the site system server has other site system roles besides the site system role, this cmdlet will fail.

Note

Configuration Manager cmdlets must be run from the Configuration Manager site drive. The examples in this article use the site name XYZ. For more information, see the getting started documentation.

Examples

Example 1: Remove a site system server by using the pipeline

PS XYZ:\> Get-CMSiteSystemServer -SiteSystemServerName "Server2.contoso.com" -SiteCode "MP5" | Remove-CMSiteSystemServer -Force

This command gets the site system server object named Server2.contoso.com with the site code MP5 and uses the pipeline operator to pass the object to Remove-CMSiteSystemServer, which removes the site system server object.

Example 2: Remove a site system server

PS XYZ:\> Remove-CMSiteSystemServer -SiteSystemServerName "Server2.contoso.com" -SiteCode "MP5" -Force

This command removes the site system server named Server2.contoso.com with the site code MP5.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Specifies a site system server object. To obtain a site system server object, use the Get-CMSiteSystemServer cmdlet.

Type:IResultObject
Aliases:SiteSystem, SiteSystemServer
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-SiteCode

Specifies a site code of a Configuration Manager site.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteSystemServerName

Specifies a server name for the site system.

Type:String
Aliases:Name, ServerName
Position:0
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs