Write-SCOMCommand
Write-SCOMCommand
Writes a new command to interact with Operations Manager.
Syntax
Parameter Set: Name
Write-SCOMCommand -Name <String> [ <CommonParameters>]
Parameter Set: NoName
Write-SCOMCommand -NoName [ <CommonParameters>]
Detailed Description
The Write-SCOMCommand cmdlet writes a new Windows PowerShell command to interact with System Center 2012 – Operations Manager. The new command uses the same common SDK connection code as the standard Operations Manager cmdlets.
Parameters
-Name<String>
Specifies the name of the command.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NoName
Indicates that the cmdlet creates an unnamed script.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
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: Write a new script command
This command outputs a new script command template named Test-DivBManagementPack.
PS C:\> Write-SCOMCommand -Name "Test-DivBManagementPack"