Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Uninstalls agents from agent-managed computers.
Parameter Set: Empty
Uninstall-SCOMAgent -Agent <AgentManagedComputer> [-ActionAccount <PSCredential> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Uninstall-SCOMAgent cmdlet uninstalls agents from agent-managed computers.
Specifies the credentials under which the agent uninstall task will run. If this parameter is omitted or has a null value, the default action account of the management server managing the agent is used.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies one or more agent objects to uninstall. Enter a variable that represents the agents, or type a command that gets the agents.
For information about how to get agents, type Get-Help Get-SCOMAgent.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Describes what would happen if you executed the command without actually executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.EnterpriseManagement.Administration.AgentManagedComputer
The output type is the type of the objects that the cmdlet emits.
- Microsoft.EnterpriseManagement.Administration.AgentTaskResult
Description
-----------
This command gets the agent "Server01.Contoso.com" and then uninstalls it.
PS C:\>Get-SCOMAgent Server01.Contoso.com | Uninstall-SCOMAgent
Description
-----------
The first command gets the agent-managed computer named "Server01.Contoso.com" and stores it in the $Agent variable.
The second command uninstalls the agent stored in the $Agent variable.
PS C:\>$Agent = Get-SCOMAgent Server01.Contoso.com
PS C:\>Uninstall-SCOMAgent -Agent $Agent
Description
-----------
The first command gets the agent named "Server01.Contoso.com" and stores it in the $Agent variable.
The second command uninstalls the agent stored in the $Agent variable using the credentials the user is prompted for.
PS C:\>$Agent = Get-SCOMAgent Server01.Contoso.com
PS C:\>Uninstall-SCOMAgent -Agent $Agent -ActionAccount (Get-Credential)