Set-SCService

Modifies a VMM service instance.

Syntax

Set-SCService [-Service] <Service> [-Cloud <Cloud>] [-CommitPendingServiceTemplate] [-CostCenter <String>]
 [-Description <String>] [-JobVariable <String>] [-Name <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-Owner <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-ServicePriority <ServicePriority>] [-UserRole <UserRole>] [-VMMServer <ServerConnection>] [-WhatIf]
 [<CommonParameters>]
Set-SCService [-Service] <Service> [-Cloud <Cloud>] [-CostCenter <String>] [-Description <String>]
 [-DismissPendingServiceTemplate] [-JobVariable <String>] [-Name <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-Owner <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-ServicePriority <ServicePriority>] [-UserRole <UserRole>] [-VMMServer <ServerConnection>] [-WhatIf]
 [<CommonParameters>]
Set-SCService [-Service] <Service> [-Cloud <Cloud>] [-CostCenter <String>] [-Description <String>]
 [-JobVariable <String>] [-Name <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-Owner <String>] [-PROTipID <Guid>] -PendingServiceTemplate <ServiceTemplate> [-RunAsynchronously]
 [-ServicePriority <ServicePriority>] [-UserRole <UserRole>] [-VMMServer <ServerConnection>]
 [<CommonParameters>]

Description

The Set-SCService cmdlet modifies a Virtual Machine Manager (VMM) service instance.

Examples

Example 1: Change the description and priority of a service

PS C:\> $Service = Get-SCService -Name "Service01"
PS C:\> Set-SCService -Service $Service -Description "Contoso Custom Service" -ServicePriority Normal

The first command command gets the service object named Service01 and stores the object in the $Service variable.

The second command updates the description and priority for the service stored in $Service.

Example 2: Dismiss a pending service template

PS C:\> $Service = Get-SCService -Name "Service01"
PS C:\> Set-SCService -Service $Service -DismissPendingServiceTemplate

The first command gets the service object named Service01 and stores the object in the $Service variable.

The second command dismisses the pending servicing operation.

Parameters

-Cloud

Specifies a private cloud object.

Type:Cloud
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommitPendingServiceTemplate

Applies the pending service template to the service instance.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CostCenter

Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the service instance.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DismissPendingServiceTemplate

Removes a pending service template from a service instance.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Owner

Specifies the owner of a VMM object in the form of a valid domain user account.

- Example format: -Owner "Contoso\PattiFuller"

  • Example format: -Owner "PattiFuller@Contoso"

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PendingServiceTemplate

Specifies a service template object that has been updated but not applied to the service instance.

Type:ServiceTemplate
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Service

Specifies a VMM service object.

Type:Service
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ServicePriority

Specifies the priority for a service. Valid values are: Normal, Low, High. Default value: Normal.

Type:ServicePriority
Parameter Sets:Normal, Low, High
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserRole

Specifies a user role object.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Service

This cmdlet returns a **Service** object.