Disk operations with PowerShell v3 on Windows Server 8 Beta – Part 1
Posted in Windows Powershell, Windows Server | No Comment | 6,751 views | 05/03/2012 00:44
In this post, I’ll talk about disk operations on Windows Server 8 Beta. I have Windows 7 and Windows Server 8 Beta on a PC and I want to install Windows 8 Beta as well. I will resize my current Windows Server 8 partition and create a new partition for Windows 8 Beta. When I want to do this operation via Server Manager GUI (in case of you have Server 8 with GUI), I don’t see any option for “Shrink”. Maybe I’m looking to wrong section but here it is:
So lets do this operation via Powershell.
1. First of all lets get partition information.
2. My drive letter is W. So I can get detailed information.
3. Drive size is 373 Gb. I’ll resize it to 250 Gb.
4. You can see new partition size to confirm operations.
5. Now let’s create our new partition for Windows 8 Beta. I’ll call it “Y” drive.
Oh! Windows ask me to format drive. This is not what I want. That prompt can be problem in a script. Let’s try it on another way. If we can assign drive letter right after format, then there will be no prompt.
6. Let’s remove the partition first. I know my new partition number is 3.
7. I’ll create new partition without drive letter and format it.
8. Now I can assign new drive letter to newly created partition.
Now it’s time to give an example for disk extend.
9. First, I’m resizing my Y drive as 50 GB.
10. I’m extending it to 75 GB.
So as you can see there is no difference between shrink and extend on Powershell. For all, you can just use Resize-Partition command.
I hope you find this post useful. I cover following questions in this post:
1. How to create new partition on Windows Server 8 Beta?
Please let me know if you require additional disk operations.
Applied to: PowerShell v3
Tags: disk operations on windows 8, extend disk windows 8, how to shrink space windows 8, shrink space windows 8
Leave a Reply