Get-SCServicingWindowSubscription

Get-SCServicingWindowSubscription

Gets a list of servicing window subscriptions.

構文

Parameter Set: Connection
Get-SCServicingWindowSubscription [[-ServicingWindow] <ServicingWindow> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: FromHost
Get-SCServicingWindowSubscription [[-ServicingWindow] <ServicingWindow> ] -VMHost <Host> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: FromService
Get-SCServicingWindowSubscription [[-ServicingWindow] <ServicingWindow> ] -Service <Service> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: FromVM
Get-SCServicingWindowSubscription [[-ServicingWindow] <ServicingWindow> ] -VM <VM> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

詳細説明

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

パラメーター

-Service<Service>

Specifies a VMM service object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ServicingWindow<ServicingWindow>

Specifies a servicing window object.

エイリアス

none

必須?

false

位置は?

1

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VM<VM>

Specifies a virtual machine object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMHost<Host>

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, type Get-Help Add-SCVMHost -detailed. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • ServicingWindowSubscription

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

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

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

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

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

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

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

The second command gets the servicing window subscription objects for the servicing window stored in $SvcWindow, and stores the objects in the $SvcWindowSub variable.

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

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

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

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

The second command gets the servicing window object named Backup Staging A, and then 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.

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

関連トピック

Add-SCServicingWindowSubscription

Remove-SCServicingWindowSubscription

Get-SCVirtualMachine

Get-SCServicingWindow