次の方法で共有


Get-SCServicingWindowSubscription

Gets a list of servicing window subscriptions.

Syntax

Connection (Default)

Get-SCServicingWindowSubscription
    [[-ServicingWindow] <ServicingWindow>]
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

FromVM

Get-SCServicingWindowSubscription
    [[-ServicingWindow] <ServicingWindow>]
    -VM <VM>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

FromHost

Get-SCServicingWindowSubscription
    [[-ServicingWindow] <ServicingWindow>]
    -VMHost <Host>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

FromService

Get-SCServicingWindowSubscription
    [[-ServicingWindow] <ServicingWindow>]
    -Service <Service>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

Description

The Get-SCServicingWindowSubscription cmdlet gets a list of servicing window subscriptions.

Examples

Example 1: Get a list of servicing window subscriptions for a virtual machine

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $SvcWindowSub = Get-SCServicingWindowSubscription -VM $VM
PS C:\> $SvcWindowSub

The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command gets the servicing window subscription objects for the virtual machine stored in $VM (VM01) and stores the objects in the $SvcWindowSub variable.

The last command displays the servicing windows stored in $SvcWindowSub for the user.

Example 2: Get a list of subscriptions for a specified servicing window

PS C:\> $SvcWindow = Get-SCServicingWindow -Name "Backup Staging A"
PS C:\> $SvcWindowSub = Get-SCServicingWindowSubscription -ServicingWindow $SvcWindow
PS C:\> $SvcWindowSub

The first command gets the servicing window object named Backup Staging A and stores the object in the $SvcWindow variable.

The second command gets the servicing window subscription objects for the servicing window stored in $SvcWindow (Backup Staging A) and stores the objects in the $SvcWindowSub variable.

The last command displays the list of subscriptions stored in $SvcWindowSub to the user.

Example 3: Get the servicing window subscription for a specified virtual machine and a specified servicing window

PS C:\> $VM = Get-VM -Name "VM01"
PS C:\> $SvcWindow = Get-SCServicingWindow -Name "Backup Staging A"
PS C:\> $SvcWindowSub = Get-SCServicingWindowSubscription -VM $VM -ServicingWindow $SvcWindow
PS C:\> $SvcWindowSub

The first command gets the virutal machine object named VM01 and stores the object in the $VM variable.

The second command gets the servicing window object named Backup Staging A and stores the object in the $SvcWindow variable.

The third command gets the servicing window subscription object for the virtual machine stored in $VM (VM01) and the servicing window stored in $SvcWindow (Backup Staging A) and stores the object in the $SvcWindowSub variable.

The last command displays information about the servicing window subscription stored in $SvcWindowSub to the user.

Parameters

-Service

Specifies a Virtual Machine Manager (VMM) service object.

Parameter properties

Type:Service
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromService
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServicingWindow

Specifies a servicing window object.

Parameter properties

Type:ServicingWindow
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VM

Specifies a virtual machine object.

Parameter properties

Type:VM
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromVM
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHost

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, see the Add-SCVMHost cmdlet.

Parameter properties

Type:Host
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ServicingWindowSubscription

This cmdlet returns a ServicingWindowSubscription object.