NAME
Get-DcsSnapshotGroupCreationProperties
SYNOPSIS
Returns snapshot group creation data for all virtual disk(s) in the specified virtual disk group.
SYNTAX
Get-DcsSnapshotGroupCreationProperties -VirtualDiskGroup <Object> [-Connection <String>] [-PipelineVariable <String>] [<CommonParameters>]
DESCRIPTION
Returns snapshot group creation data for all virtual disk(s) in the specified virtual disk group. The DestinationPoolId in SnapshotGroupCreationData will be set to Id of the compatible pool for creating snapshot of the virtual disk by validating the pools in the following order:
- Preferred snapshot pool of the virtual disk,
- Default snapshot pool of the first server and,
- The pool with most free space in the first server of virtual disk.
The DestinationPoolId in SnapshotGroupCreationData will be set to "null" when there are NO compatible pools for creating snapshot of virtual disk. The Compression in SnapshotGroupCreationData will be set to true if source virtual disk has Inline Deduplication or Inline Compression or both enabled and Destination Pool has Capacity Optimization enabled. The StorageProfileId in SnapshotGroupCreationData will be inherited from the source virtual disk. The SnapshotGroupCreationData will be used as value for SnapshotGroupCreationProperties in Add-DcsSnapshot.
PARAMETERS
- -VirtualDiskGroup <Object>
- VirtualDiskGroupData object, name or ID that identifies a virtual disk group.
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
- -Connection <String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable <String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
- -<CommonParameters>
- This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
- For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
-
INPUTS
VirtualDiskGroupData: Object that identifies and describes the virtual disk group.
OUTPUTS
SnapshotGroupCreationData: Object describes the snapshot group creation properties for each virtual disk in the specified virtual disk group.
NOTES
Also see Add-DcsSnapshot, Remove-DcsSnapshotGroup.
EXAMPLES
Get-DcsSnapshotGroupCreationProperties -VirtualDiskGroup "Virtual disk group 1"
This command is invoked with VirtualDiskGroup parameter specified as "Virtual disk group 2". SnapshotGroupCreationData is returned of all the virtual disks in the specified virtual disk group.
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 480c624981d647f7a08cc9fdbfde7bed |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{ab56d14f-054e-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | True |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 2317ff2f7f294f94ba462b244d4e7526 |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0012-0ce6-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | cffa9aa70a7a4ae9bbf6e97c14d95cce |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0009-0ce6-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 8e77d2a1d77a4dd894c338e749eb2439 |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{ab56d14f-054e-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
Get-DcsSnapshotGroupCreationProperties -VirtualDiskGroup "{fc378d79-9314-4478-bfac ea1b13e90046}"
The cmdlet is invoked with the VirtualDiskGroup parameter specified as "{fc378d79-9314-4478-bfac-ea1b13e90046}". A SnapshotGroupData object is returned for each snapshot group in the specified virtual disk group. The DestinationPoolId is set to null for virtual disk "cffa9aa70a7a4ae9bbf6e97c14d95cce".
VirtualDiskGroupId | : | {fc378d79-9314-4478-bfac-ea1b13e90046} |
VirtualDiskId | : | 480c624981d647f7a08cc9fdbfde7bed |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{ab56d14f-054e-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | True |
VirtualDiskGroupId | : | {fc378d79-9314-4478-bfac-ea1b13e90046} |
VirtualDiskId | : | 2317ff2f7f294f94ba462b244d4e7526 |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0012-0ce6-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
VirtualDiskGroupId | : | {fc378d79-9314-4478-bfac-ea1b13e90046} |
VirtualDiskId | : | cffa9aa70a7a4ae9bbf6e97c14d95cce |
DestinationPoolId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
$snapshotGroupCreationProperties = Get-DcsSnapshotGroupCreationProperties -VirtualDiskGroup "Virtual disk group 1"
$snapshotGroupCreationProperties | where {$_.VirtualDiskId -eq "2317ff2f7f294f94ba462b244d4e7526"}).DestinationPoolId = "663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0009-0ce6-11ee-9f8d-00155d026515}"
$snapshotGroupCreationProperties | where {$_.VirtualDiskId -eq "cffa9aa70a7a4ae9bbf6e97c14d95cce"}).Compression = $true
$snapgroup = Add-DcsSnapshot -VirtualDiskGroup "Virtual disk group 1" -SnapshotGroupCreationProperties $snapshotGroupCreationProperties
$snapshotGroupCreationProperties
In this example, a series of cmdlet invocations is used to get the SnapshotGroupCreationData, edit SnapshotGroupCreationData for virtual disks and create snapshot group for "Virtual disk group 1" with edited SnapshotGroupCreationData. First, Get-DcsSnapshotGroupCreationProperties is invoked with "Virtual disk group 1" specified and the resulting SnapshotGroupCreationData is stored in the variable $snapshotGroupCreationProperties. Next, get SnapshotGroupCreationData from variable $snapshotGroupCreationProperties where VirtualDiskId is equal to "2317ff2f7f294f94ba462b244d4e7526" and set DestinationPoolId to "663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0009-0ce6-11ee-9f8d-00155d026515}". Next, get SnapshotGroupCreationData from variable $snapshotGroupCreationProperties where VirtualDiskId is equal to "cffa9aa70a7a4ae9bbf6e97c14d95cce" and set Compression to $true. Next, the Add-DcsSnapshot is invoked with "Virtual disk group 1" and edited $snapshotGroupCreationProperties to create snapshot group for virtual disk group "Virtual disk group 1" and returned SnapshotGroupData is stored in the variable $snapgroup. Print the edited $snapshotGroupCreationProperties.
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 480c624981d647f7a08cc9fdbfde7bed |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{ab56d14f-054e-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | True |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 2317ff2f7f294f94ba462b244d4e7526 |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0009-0ce6-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | cffa9aa70a7a4ae9bbf6e97c14d95cce |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{32bf0009-0ce6-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | True |
VirtualDiskGroupId | : | {fc378d78-9314-4478-bfac-ea1b13e90045} |
VirtualDiskId | : | 8e77d2a1d77a4dd894c338e749eb2439 |
DestinationPoolId | : | 663204D9-B5F0-4251-9B9D-C0E8CE081456:{ab56d14f-054e-11ee-9f8d-00155d026515} |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Compression | : | False |