Expanding a Windows Partition

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 years, 4 months ago.

  • Author
    Posts
  • #13051
    Profile photo of vmware guy
    vmware guy
    Participant

    I have a Windows 2008 Server virtual machine which has had its virtual hard disk expanded. Now I need to expand the partition inside the operating system. What is the simplest way to expand a windows partition in Windows 2008 Server with powershell?

  • #13052
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    Only reliable way I've found is to use diskpart

  • #13055
    Profile photo of vmware guy
    vmware guy
    Participant

    Is it possible to script the use of diskpart – for example to call diskpart from a powershell script, and tell diskpart to expand disk 0 partition 1 by the maximum amount possible?

  • #13057
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    You can call diskpart from with PowerShell

    the syntax is explained here
    http://support.microsoft.com/kb/300415

You must be logged in to reply to this topic.