Remove-WssComputer

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

Syntax

Remove-WssComputer
      [-Computer] <DeviceInfo>
      [-RemoveBackup]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

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.

Examples

Example 1: Remove a computer and backups

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

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.

Parameters

-Computer

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

Type:DeviceInfo
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-RemoveBackup

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

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