The New-SCService cmdlet deploys a new service instance into the System Center Virtual Machine Manager (VMM) environment. You can create a service directly from a service template if no service instance configuration is needed, or from a service configuration.
For more information about New-SCService, type: "Get-Help New-SCService -online".
Parameters
ServiceConfiguration
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a service configuration object.
JobVariable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that job progress is tracked and stored in the variable named by this parameter.
Owner
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the owner of a VMM object in the form of a valid domain user account.
Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"
PersistServiceConfiguration
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the service deployment configuration is stored in the VMM library after the service is deployed.
PROTipID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
RunAsynchronously
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
UserRole
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a user role object.
VMMServer
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a VMM server object.
Examples
1: Deploy a service template using a
service configuration that is stored in the library.
The first command gets the service configuration object named Contoso Service Configuration 01 and stores the object in the $SvcConfig variable.
The second command runs placement to update the service configuration stored in $SvcConfig.
The third command deploys the new service using the service configuration stored in $SvcConfig.
The last command displays the properties of the newly deployed service to the user.