Initializes disks on Windows Server
- The :ref:`community.windows.win_initialize_disk <community.windows.win_initialize_disk_module>` module initializes disks
Note
- One of three parameters (disk_number, uniqueid, and path) are mandatory to identify the target disk, but more than one cannot be specified at the same time.
- A minimum Operating System Version of Server 2012 or Windows 8 is required to use this module.
- This module is idempotent if force is not specified.
.. seealso:: :ref:`community.windows.win_disk_facts_module` The official documentation on the **community.windows.win_disk_facts** module. :ref:`community.windows.win_partition_module` The official documentation on the **community.windows.win_partition** module. :ref:`community.windows.win_format_module` The official documentation on the **community.windows.win_format** module.
- name: Initialize a disk
community.windows.win_initialize_disk:
disk_number: 1
- name: Initialize a disk with an MBR partition style
community.windows.win_initialize_disk:
disk_number: 1
style: mbr
- name: Forcefully initiallize a disk
community.windows.win_initialize_disk:
disk_number: 2
force: yes
- Brant Evans (@branic)