Partilhar via


Set-SCService

Set-SCService

Modifies a VMM service instance.

Syntax

Parameter Set: UnspecifiedSet
Set-SCService [-Service] <Service> [-Cloud <Microsoft.SystemCenter.VirtualMachineManager.Cloud> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <ServicePriority> {Normal | Low | High} ] [-UserRole <UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: CommitST
Set-SCService [-Service] <Service> -CommitPendingServiceTemplate [-Cloud <Microsoft.SystemCenter.VirtualMachineManager.Cloud> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <ServicePriority> {Normal | Low | High} ] [-UserRole <UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: DismissST
Set-SCService [-Service] <Service> -DismissPendingServiceTemplate [-Cloud <Microsoft.SystemCenter.VirtualMachineManager.Cloud> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <ServicePriority> {Normal | Low | High} ] [-UserRole <UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: PendingST
Set-SCService [-Service] <Service> -PendingServiceTemplate <ServiceTemplate> [-Cloud <Microsoft.SystemCenter.VirtualMachineManager.Cloud> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <ServicePriority> {Normal | Low | High} ] [-UserRole <UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

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

Parameters

-Cloud<Microsoft.SystemCenter.VirtualMachineManager.Cloud>

Aliases

none

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CostCenter<String>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

named

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

-Owner<String>

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"

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PendingServiceTemplate<ServiceTemplate>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Service<Service>

Specifies a VMM service object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ServicePriority<ServicePriority>

Specifies the priority for a service. Valid values are:

-- Normal
-- Low
-- High

The default value is Normal.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserRole<UserRole>

Specifies a user role object.

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.

  • Service

Examples

Example 1: Change the description and priority of a service

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

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

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

Example Example 2:. Dismiss a pending service template:

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

The second command dismisses the pending servicing operation.

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

Get-SCService

New-SCService

Read-SCService

Remove-SCService

Resume-SCService

Start-SCService

Stop-SCService

Suspend-SCService

Update-SCService