Export (0) Print
Expand All

Uninstall-SCXAgent

Updated: November 1, 2013

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

Uninstall-SCXAgent

Uninstalls the management agent on the specified managed UNIX and Linux computers.

Syntax

Parameter Set: Default
Uninstall-SCXAgent [-Agent] <IPersistedUnixComputer[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SshCredential <PSCredential> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Empty
Uninstall-SCXAgent [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromAgentNames
Uninstall-SCXAgent [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromManagementServer
Uninstall-SCXAgent [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Uninstall-SCXAgent cmdlet uninstalls the management agent on the specified UNIX and Linux computers.

The required Agent parameter specifies the targeted managed UNIX or Linux computers to uninstall and requires a UNIX or Linux computer object. For information about retrieving managed UNIX or Linux computers, type Get-Help Get-SCXAgent. An optional SSHCredential parameter can be specified to identify the privileged credential used for uninstallation of the management agent. If the SSHCredential is not specified, the cmdlet attempts to use the defined privileged Run As account for the agent.

This cmdlet does not return any output.

Parameters

-Agent<IPersistedUnixComputer[]>

Specifies one or more managed UNIX or Linux computer objects. For information about how to get a managed UNIX or Linux computer object, type Get-Help Get-SCXAgent.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies the name of a computer to establish a connection with. The computer must be running the System Center Data Access Service. The default value is the computer for the current management group connection. Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run. The default is the current user. Type a user name, such as "User01", "Domain01\User01", or "User@Domain.com", or enter a PSCredential object, such as one that is returned by the Get-Credential cmdlet. When you type a user name, you are prompted for a password. For more information, type Get-Help Get-Credential.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies a connection.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-SshCredential<PSCredential>

Specifies a privileged SSH credential used to perform the agent maintenance actions. If this parameter is not specified, the cmdlet attempts to use the defined agent maintenance Run As account for the agent.

For information about how to get an SSH credential object, type Get-Help Get-SCXSSHCredential.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

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.

  • None.


    The output is a list of results, each representing the uninstall status for a computer:

    hostname, uninstall status, description

    *Description includes the details of why uninstall failed.


Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command uninstalls the agent by using a specified SSH credential.


C:\PS>$MyAgent = Get-SCXAgent -Name nx1.contoso.com$SSHCredential=Get-SCXSSHCredential -UserName userBob -SSHKey c:\keys\key.ppk -ElevationType sudoUninstall-SCXAgent -SSHCredential $SSHCredential -Agent $MyAgent

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command uninstalls the agent by using the defined Run As account associated with the agent.


C:\PS>Get-SCXAgent -Name nx1.contoso.com | Uninstall-SCXAgent
 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft