Skip to main content
SnapCenter 5.0 cmdlets

Remove-SmHost

Contributors

Removes one or more hosts from SnapCenter.

Syntax

Remove-SmHost [-HostNames]  <String>  [-Force]  <>  [-PluginCode]  <PluginCode>

Detailed Description

Removes one or more hosts from SnapCenter.Note: For this command to succeed, the host you are removing must be resolvable in DNS or in the SnapCenter Server's hosts file.This applies even when you use the -force option.

Parameters

Name Description Required? Pipeline Input Default Value

HostNames

Specifies one or more hosts that you want to remove. You can remove a cluster and all its nodes by specifying the cluster name.

true

true (ByPropertyName)

Force

Forces the removal of discovered resources and hosts.For Oracle databases, if the backup is cataloged, and you force deletion of a host, cataloged backups associated with that host are not uncataloged. Therefore, if you want to force delete an Oracle database host, you must first uncatalog all the cataloged backups for that host before forcing the deletion of the host.

false

true (ByPropertyName)

PluginCode

Provides the plug-in code for the host you want to remove. Valid plug-in codes include SCSQL, SCO and SCV. For example, if you want to remove SnapCenter Plug-in for Microsoft SQL Server host, the plug-in code is SCSQL.

false

true (ByPropertyName)

DoNotIncludeClusterNodes

Specifies that the host plug-in packages are not uninstalled from cluster nodes. If you set the parameter to True, then the host package is uninstalled only from the specified host. The default value is False, which means that when you provide a cluster name, the host package is uninstalled from all nodes in the cluster.

false

true (ByPropertyName)

Examples

Example 1: Removing a host without backups or clones

 Remove-smhost -HostNames localhost

This example syntax removes a host from SnapCenter.

Remove-SmHost
Are you sure you want to remove the host and its resources.?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): yName: Remove Host 'HostName'
Id  : 44390
StartTime   : 4/17/2017 2:07:51 AM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : True
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0
JobTypeId   : 10
ApisJobKey  :
ObjectId: 0
PluginCode  : NONE
PluginName  :

Example 2: Removing a host without a confirm dialogue

 Remove-smhost -HostNames localhost -Confirm:$false

This example syntax removes a host from SnapCenter.

Name: Remove Host 'Host name'
Id  : 44391
StartTime   : 4/17/2017 2:08:50 AM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : True
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0
JobTypeId   : 10
ApisJobKey  :
ObjectId: 0
PluginCode  : NONE
PluginName  :

Example 3: Removing a host with backups and clones

 Remove-smhost -HostNames localhost -Force

Delete the resource backups and clones associated with this host as part of the delete host operation.

Remove-SmHost
Are you sure you want to remove the host and its resources.?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): yName: Remove Host 'HostName'
Id  : 44392
StartTime   : 4/17/2017 2:10:09 AM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : True
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0
JobTypeId   : 10
ApisJobKey  :
ObjectId: 0
PluginCode  : NONE
PluginName  :

Example 4: Removing a host with clones on an alternate host

 Remove-smhost -HostNames localhost -Force -ForceDeleteClones

Delete resources that are cloned or mounted on an alternate host as part of the delete host operation.

Remove-SmHost
Are you sure you want to remove the host and its resources.?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): yName: Remove Host 'HostName'
Id  : 44392
StartTime   : 4/17/2017 2:10:09 AM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : True
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0
JobTypeId   : 10
ApisJobKey  :
ObjectId: 0
PluginCode  : NONE
PluginName  :