Remove-RMCollection

From PowerGUI Wiki

Jump to: navigation, search

Deletes one or more computer collections.

Contents

Syntax

Remove-RMCollection [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] Remove-RMCollection -InputObject <ComputerCollection[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description

Deletes the computer collection that has the specified name or is represented by the specified objects.



Related Commands

Parameters

Name Description Required? Pipeline Input Default Value
Name Specifies the name of the computer collection to be deleted. true true (ByPropertyName)
WhatIf Describes what would happen if you executed the command without actually executing the command. false false
Confirm Prompts for a confirmation before executing the command. false false
InputObject Deletes a computer collection represented by specified collection objects. Enter a variable that contains the objects or type a command or expression that gets the objects. true true (ByValue)

Examples

Example 1

Remove-RMCollection "New Computer Collection"

Deletes the computer collection named New Computer Collection.

Example 2

Get-RMCollection | Where-Object {$_.Schedule.Count -eq 0} | Remove-RMCollection

The Get-RMCollection cmdlet gets all computer collections. The Where-Object cmdlet then filters out the collections that are not scheduled for a backup operation. The pipeline operator passes the filtered collection objects to the Remove-RMCollection cmdlet, which deletes these collection objects.

Personal tools