Get-SCOMCommand

Get-SCOMCommand

Gets Operations Manager commands in the current session.

Syntax

Parameter Set: CmdletSet
Get-SCOMCommand [-Noun <String[]> ] [-Verb <String[]> ] [ <CommonParameters>]

Parameter Set: AllCommandSet
Get-SCOMCommand [[-Name] <String[]> ] [-CommandType <CommandTypes> ] [ <CommonParameters>]

Detailed Description

The Get-SCOMCommand cmdlet gets System Center 2012 – Operations Manager commands in the current session. If you do not specify any parameters for the cmdlet, the cmdlet returns all commands in the current session.

Parameters

-CommandType<CommandTypes>

Specifies a Operations Manager command type.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies an array of names of Operations Manager commands.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Noun<String[]>

Specifies an array of nouns in Operations Manager cmdlet names.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Verb<String[]>

Specifies an array of verbs in Operations Manager cmdlet names.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

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: Get commands by using a name

This command gets all commands in the Operations Manager module that have agent in the name of the command.

PS C:\> Get-SCOMCommand "*agent*"

Example 2: Get commands by using a cmdlet verb

This command gets all commands in the Operations Manager module that use the verb Get.

PS C:\> Get-SCOMCommand -Verb "Get"

Write-SCOMCommand