Share via


Remove-SCOMAgentlessManagedComputer

Removes agentless managed computers from a management group.

Syntax

Default (Default)

Remove-SCOMAgentlessManagedComputer
    [-Computer] <RemotelyManagedComputer[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-SCOMAgentlessManagedComputer cmdlet removes one or more agentless managed computers from a management group.

Examples

Example 1: Remove agentless managed computers from the management group

PS C:\>Get-SCOMAgentlessManagedComputer -DNSHostName "server01*" | Remove-SCOMAgentlessManagedComputer -Confirm

This command removes managed computers that do not have Operations Manager agent. The command uses the Get-SCOMAgentlessManagedComputer cmdlet to get all agentless managed computers with names that begin with server01, and passes the results to the Remove-SCOMAgentlessManagedComputer cmdlet by using the pipeline operator. The command removes the agentless managed computers returned by the Get-SCOMAgentlessManagedComputer cmdlet from the management group.

Parameters

-Computer

Specifies an array of agentless managed computers. You can use the Get-SCOMAgentlessManagedComputer cmdlet to get managed computers that do not have Operations Manager agents.

Parameter properties

Type:

RemotelyManagedComputer[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.