Set-SCService

Modifies a VMM service instance.

Syntax

Set-SCService
   [-Name <String>]
   [-Description <String>]
   [-Owner <String>]
   [-CostCenter <String>]
   [-ServicePriority <ServicePriority>]
   [-VMMServer <ServerConnection>]
   [-Service] <Service>
   [-UserRole <UserRole>]
   [-Cloud <Cloud>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Set-SCService
   [-Name <String>]
   [-Description <String>]
   [-Owner <String>]
   [-CostCenter <String>]
   [-ServicePriority <ServicePriority>]
   [-VMMServer <ServerConnection>]
   [-Service] <Service>
   -PendingServiceTemplate <ServiceTemplate>
   [-UserRole <UserRole>]
   [-Cloud <Cloud>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Set-SCService
   [-Name <String>]
   [-Description <String>]
   [-Owner <String>]
   [-CostCenter <String>]
   [-ServicePriority <ServicePriority>]
   [-VMMServer <ServerConnection>]
   [-Service] <Service>
   [-DismissPendingServiceTemplate]
   [-WhatIf]
   [-UserRole <UserRole>]
   [-Cloud <Cloud>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Set-SCService
   [-Name <String>]
   [-Description <String>]
   [-Owner <String>]
   [-CostCenter <String>]
   [-ServicePriority <ServicePriority>]
   [-VMMServer <ServerConnection>]
   [-Service] <Service>
   [-CommitPendingServiceTemplate]
   [-WhatIf]
   [-UserRole <UserRole>]
   [-Cloud <Cloud>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CommitPendingServiceTemplate

Applies the pending service template to the service instance.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description for the service instance.

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

-DismissPendingServiceTemplate

Removes a pending service template from a service instance.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of a VMM object.

Type:String
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Service

Specifies a VMM service object.

Type:Service
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServicePriority

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

Type:ServicePriority
Accepted values:Normal, Low, High
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserRole

Specifies a user role object.

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

-VMMServer

Specifies a VMM server object.

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

-WhatIf

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

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

Outputs

Service

This cmdlet returns a Service object.