-
Notifications
You must be signed in to change notification settings - Fork 52
/
DSC_VirtualHardDisk.config.ps1
40 lines (36 loc) · 1.34 KB
/
DSC_VirtualHardDisk.config.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$TestFixedVirtualHardDiskVhd = @{
FilePath = "$($pwd.drive.name):\newTestFixedVhd.vhd"
DiskSize = 5GB
DiskFormat = 'Vhd'
DiskType = 'Fixed'
}
$TestDynamicVirtualHardDiskVhdx = @{
FilePath = "$($pwd.drive.name):\newTestDynamicVhdx.vhdx"
DiskSize = 10GB
DiskFormat = 'Vhdx'
DiskType = 'Dynamic'
}
configuration DSC_VirtualHardDisk_CreateAndAttachFixedVhd_Config {
Import-DscResource -ModuleName StorageDsc
node localhost {
VirtualHardDisk Integration_Test {
FilePath = $TestFixedVirtualHardDiskVhd.FilePath
DiskSize = $TestFixedVirtualHardDiskVhd.DiskSize
DiskFormat = $TestFixedVirtualHardDiskVhd.DiskFormat
DiskType = $TestFixedVirtualHardDiskVhd.DiskType
Ensure = 'Present'
}
}
}
configuration DSC_VirtualHardDisk_CreateAndAttachDynamicallyExpandingVhdx_Config {
Import-DscResource -ModuleName StorageDsc
node localhost {
VirtualHardDisk Integration_Test {
FilePath = $TestDynamicVirtualHardDiskVhdx.FilePath
DiskSize = $TestDynamicVirtualHardDiskVhdx.DiskSize
DiskFormat = $TestDynamicVirtualHardDiskVhdx.DiskFormat
DiskType = $TestDynamicVirtualHardDiskVhdx.DiskType
Ensure = 'Present'
}
}
}