New-SCExternalJob
New-SCExternalJob
Creates a new external job in VMM.
Syntax
Parameter Set: Default
New-SCExternalJob [-Name] <String> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-ResultObject <ClientObject> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The New-SCExternalJob cmdlet creates external jobs in Virtual Machine Manager (VMM).
External jobs add non-VMM jobs to the jobs view in the VMM console. These jobs are typically used to allow other applications integrating with VMM to serve status updates into the console so that users of the console can see the updates. For example, if you create an Add-in, you might use external jobs to provide the status of work completed on another system.
Parameters
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-OnBehalfOfUser<System.String>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ResultObject<ClientObject>
Specifies the object to which a new external job is related.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
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.
- Task
Examples
Example 1: Create an external job
The first command gets the virtual machine object named VM01, and then stores the object in the $VMMObject variable. The object in this command can be any VMM object for which you are creating a job.
The second command creates an external job named ExternalJob01 and relates the job to VM01 which is stored in $VMMObject.
PS C:\> $VMMObject = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCExternalJob -Name "ExternalJob01" -ResultObject $VMMObject