Expanding a Windows Partition

Welcome Forums General PowerShell Q&A Expanding a Windows Partition

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
4 years, 9 months ago.

  • Author
    Posts
  • #13051

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    Only reliable way I've found is to use diskpart

  • #13055

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    You can call diskpart from with PowerShell

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

The topic ‘Expanding a Windows Partition’ is closed to new replies.