Skip to content

Latest commit

 

History

History
154 lines (125 loc) · 2.96 KB

Disks.adoc

File metadata and controls

154 lines (125 loc) · 2.96 KB

DSC Resource 'Disks'

Disks initializes, formats, and mounts disk partitions as drive letters.

When to use 'Disks'

Use this resource when you need to prepare raw disks for use by initializing them, creating partitions, formatting volumes, and assigning drive letters. This is essential for any server with additional data disks that need to be brought online and made available to the operating system.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'Disks'
Parameter Attribute DataType Description Allowed Values

Disks

Mandatory

Hashtable[]

List of disk specifications

Table 2. Attributes of category 'Disks/Disks'
Parameter Attribute DataType Description Allowed Values

DiskId

Required

String

Specifies the disk identifier for the disk to modify.

DriveLetter

Key

String

Specifies the identifier for which disk to modify.

DiskIdType

String

Specifies the identifier type the DiskId contains.

  • Number (default)

  • UniqueId

  • Guid

  • Location

PartitionStyle

String

Specifies the partition style of the disk.

  • GPT (default)

  • MBR

  • GPT

Size

UInt64

Specifies the size of new volume.
Leave empty to use the remaining free space.

FSLabel

String

Define volume label if required.

AllocationUnitSize

UInt32

Specifies the allocation unit size to use when formatting the volume.

FSFormat

String

Specifies the file system format of the new volume.

  • NTFS

  • ReFS

AllowDestructive

Boolean

Specifies if potentially destructive operations may occur.

ClearDisk

Boolean

Specifies if the disks partition schema should be removed entirely, even if data and OEM partitions are present. Only possible with AllowDestructive enabled.

Example
Disks:
  Disks:
    - DiskId:             0
      DiskIdType:         Number
      DriveLetter:        C
      PartitionStyle:     MBR
      FSLabel:            System
      Size:               1GB
      AllocationUnitSize: 4096
      FSFormat:           NTFS
      AllowDestructive:   true
      ClearDisk:          true

    - DiskId:      1
      DiskIdType:  Number
      DriveLetter: D
      FSLabel:     Data
      AllocationUnitSize: 2KB
See also