Online disk

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2

Brings disks that are currently offline to an online state.


This command is not available in any edition of Windows Vista.


This command will fail if it is used on a read-only disk.

For instructions regarding how to use this command, see Reactivate a Missing or Offline Dynamic Disk (


online disk [noerr]


Parameter Description


For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.


  • When used without parameters in Windows Vista, this command operates on a disk group. For basic disks, there is never more than one disk per group. For dynamic disks, the group includes all non-foreign dynamic disks.

  • For basic disks, this command will attempt to bring online the selected disk and all volumes on that disk.

  • For dynamic disks, this command will attempt to bring online all disks that are not marked as foreign on the local computer. It will also attempt to bring online all volumes on the set of dynamic disks.

  • If a dynamic disk in a disk group is brought online and it is the only disk in the group, then the original group is recreated and the disk is moved to that group. If there are other disks in the group and they are online, then the disk is simply added back into the group.

  • If the group of a selected disk contains mirrored or RAID-5 volumes, this command also resynchronizes these volumes.

  • A disk must be selected for this command to succeed. Use the select disk command to select a disk and shift the focus to it.


To bring the disk with focus online, type:

online disk

Additional references

Command-Line Syntax Key