Main Contents

Partition alignment

March 11, 2009

Windows:

strComputer = "."
Set wmi= GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set col = wmi.ExecQuery("SELECT * FROM Win32_DiskPartition",,48) 

For Each item in col
	Wscript.Echo "Disk: " & item.DiskIndex & "  Partition: " & item.Index & "  StartingOffset: " & item.StartingOffset/1024 & "KB"     

Next

Set partition alignment on a new partition, required on <= Win2003

c:\>diskpart.exe
DISKPART>list disk
DISKPART>select disk x
DISKPART>create partition primary align=64
DISKPART>exit

Filed under: Microsoft, Windows |

Sorry, the comment form is closed at this time.