Remove-WssComputer

Remove-WssComputer

Removes a client computer identity, backup, and properties from the network.

Syntax

Parameter Set: Default
Remove-WssComputer [-Computer] <DeviceInfo> [-RemoveBackup] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-WssComputer cmdlet removes a client computer identity, backup, and properties from the network. For active clients, the cmdlet removes the computer identity, but does not remove backups, unless you use the RemoveBackup parameter to remove associated backups.

An archived client exists only as a backup of a computer that is no longer part of the network. This cmdlet removes the identity, backup, and properties for an archived client without the RemoveBackup parameter.

Parameters

-Computer<DeviceInfo>

Specifies the DeviceInfo object for computer. To obtain DeviceInfo objects, use the Get-WssComputer cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-RemoveBackup

Indicates that the cmdlet removes any backups for the specified computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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 computer and backups

This example removes a computer identity and any backups from the network.

The first command uses the Get-WssComputer cmdlet to get all DeviceInfo objects, and then stores them in the $DeviceList variable.

The second command removes a DeviceInfo object. The command uses standard array notation to specify the first element of the $DeviceList array as the computer to be removed. The command includes the RemoveBackup parameter. Therefore, the command removes any backups.

PS C:\> $DeviceList = Get-WssComputer
PS C:\> Remove-WssComputer -Computer $DeviceList[0] -RemoveBackup

Get-WssComputer

Get-WssComputer