Remove-SCOMAgentlessManagedComputer

Remove-SCOMAgentlessManagedComputer

Removes agentless managed computers from a management group.

Syntax

Parameter Set: Default
Remove-SCOMAgentlessManagedComputer [-Computer] <RemotelyManagedComputer[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

Parameters

-Computer<RemotelyManagedComputer[]>

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.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

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 agentless managed computers from the management group

This command removes managed computers that do not have Operations Manager agent. The command uses the Get-SCOMAgentlesslyManagedComputer 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-SCOMAgentlesslyManagedComputer cmdlet from the management group.

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

Get-SCOMAgentlessManagedComputer

Add-SCOMAgentlessManagedComputer

Set-SCOMAgentlessManagedComputer