Get-ShieldedVMProvisioningStatus

Queries the provisioning status of a shielded virtual machine.

Syntax

Get-ShieldedVMProvisioningStatus
   [-VMName] <String>
   [<CommonParameters>]
Get-ShieldedVMProvisioningStatus
   [-VM] <VirtualMachine>
   [<CommonParameters>]
Get-ShieldedVMProvisioningStatus
   -ProvisioningJob <CimInstance>
   [<CommonParameters>]

Description

The Get-ShieldedVMProvisioningStatus cmdlet queries the provisioning status of a shielded virtual machine.

Examples

Example 1: Get the provisioning job status for a virtual machine

PS C:\>Get-ShieldedVMProvisioningStatus -VMName "MyVM"

This command gets the provisioning job status for the virtual machine named MyVM.

Example 2: Get the provisioning job status for a virtual machine using a variable

PS C:\>$VM = Get-VM -VMName "MyVM"
Get-ShieldedVMProvisioningStatus -VM $VM

The first command gets the virtual machine named MyVM and stores it in the variable named $VM.

The second command gets the provisioning job status for the virtual machine stored in the variable named $VM.

Example 3: Get the provisioning job status for a virtual machine using an existing provisioning job object

PS C:\>$Job = Get-ShieldedVMProvisioningStatus -VMName "MyVM"
Get-ShieldedVMProvisioningStatus -ProvisioningJob $Job

The first command gets the provisioning job status for the virtual machine named MyVM and stores it in the variable named $Job.

The second command calls Get-ShieldedVMProvisioningStatus again using the provisioning job status stored in the $Job variable.

Parameters

-ProvisioningJob

Specifies a CimInstance object returned from either the Initialize-ShieldedVM cmdlet or a prior call to the Get-ShieldedVMProvisioningStatus cmdlet.

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

-VM

Specifies the virtual machine that this cmdlet provisions.

Type:VirtualMachine
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMName

Specifies the name of the virtual machine that this cmdlet provisions.

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