Get-AzSnapshot
Hämtar egenskaperna för en ögonblicksbild
Syntax
Get-AzSnapshot
[[-ResourceGroupName] <String>]
[[-SnapshotName] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Cmdleten Get-AzSnapshot hämtar egenskaperna för en ögonblicksbild.
Exempel
Exempel 1
Get-AzSnapshot
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName1
Name : SnapshotName1
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName2
Name : SnapshotName2
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
ResourceGroupName : ResourceGroupName2
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName2/providers/Microsoft.Compu
te/snapshots/SnapshotName3
Name : SnapshotName3
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
Det här kommandot hämtar egenskaperna för alla ögonblicksbilder av prenumerationen.
Exempel 2
Get-AzSnapshot -ResourceGroupName "ResourceGroupName1"
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName1
Name : SnapshotName1
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName2
Name : SnapshotName2
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
Det här kommandot hämtar egenskaperna för alla ögonblicksbilder i resursgruppen med namnet "ResourceGroupName1"
Exempel 3
Get-AzSnapshot -ResourceGroupName "ResourceGroupName1" -SnapshotName "SnapshotName1"
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName1
Name : SnapshotName1
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
Det här kommandot hämtar egenskaperna för ögonblicksbilden med namnet "SnapshotName1" i resursgruppen med namnet "ResourceGroupName1"
Exempel 4
Get-AzSnapshot -SnapshotName "SnapshotName*"
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName1
Name : SnapshotName1
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
ResourceGroupName : ResourceGroupName1
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName1/providers/Microsoft.Compu
te/snapshots/SnapshotName2
Name : SnapshotName2
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
ResourceGroupName : ResourceGroupName2
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated : 4/10/2018 7:05:42 PM
OsType : Windows
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB : 127
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName2/providers/Microsoft.Compu
te/snapshots/SnapshotName3
Name : SnapshotName3
Type : Microsoft.Compute/snapshots
Location : westus2
Tags : {}
Det här kommandot hämtar alla ögonblicksbilder som börjar med "SnapshotName"
Parametrar
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceGroupName
Anger namnet på en resursgrupp.
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | True |
-SnapshotName
Anger namnet på en ögonblicksbild.
Typ: | String |
Alias: | Name |
Position: | 1 |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | True |
Indata
Utdata
Azure PowerShell