PowerShell Logo Small

Initialize-Disk



This is the built-in help made by Microsoft for the command 'Initialize-Disk', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Initializes a RAW disk for first time use, enabling the disk to be formatted and used to store data.

SYNTAX


Initialize-Disk [-Number] <UInt32[]> [-AsJob] [-CimSession <CimSession[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Initialize-Disk [-AsJob] [-CimSession <CimSession[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] -UniqueId <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Initialize-Disk [-AsJob] [-CimSession <CimSession[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm]
[-WhatIf] [<CommonParameters>]
Initialize-Disk [-AsJob] [-CimSession <CimSession[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] [-VirtualDisk <CimInstance>] [-Confirm]
[-WhatIf] [<CommonParameters>]
Initialize-Disk [-AsJob] [-CimSession <CimSession[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] -Path <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Initialize-Disk [-AsJob] [-CimSession <CimSession[]>] [-FriendlyName <String[]>] [-PartitionStyle <PartitionStyle>] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Initialize-Disk cmdlet initializes a Disk object with the RAW partition style to either the MBR or GPT partition styles. The default partition style is GPT. Disks must
be initialized before they can be formatted and used to store data.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=307001
Clear-Disk
Get-Disk
Get-Partition
Set-Disk
Update-Disk

REMARKS

<

Examples


Example 1: Initialize a disk using default values

PS C:\>Initialize-Disk -Number 1



This example initializes the first disk in the computer (disk number 1), using the default values, which initializes the disk using the GPT partition style.




Example 2: Initialize a disk using the MBR partition style

PS C:\> Initialize-Disk -Number 1 -PartitionStyle MBR



This example initializes a disk using the MBR partition style.




Example 3: Initialize a virtual disk

PS C:\>Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName UserData)



This example uses the VirtualDisk parameter with the Get-VirtualDisk cmdlet to get a virtual disk with the friendly name UserData, and initialize the Disk object associated
with the virtual disk.