34 C
Ahmedabad
Friday, July 4, 2025

Powershell Script for Disk Extension – Windows 7/10/11

We can increase the drive space either to desired size within available or to the max size available. The below will help to get the maximum possible size.

The below can be remotely executed either via Ps-Remoting/Invoke-Command or through SCCM execute script.

—————————————————————————————

Important:

Disclaimer:

    The below script is tested but it might need to be customised in accordance with the environment/Requirement. Please test this in you LAB/POC environment before trying this in Production VM’s.

—————————————————————————————-

$size = Get-PartitionSupportedSize -DriveLetter C

 

#Resize the C drive to the maximum size available. Replace ‘C’ with desired drive Name

Resize-Partition -DriveLetter C -Size $size.SizeMax

Author

  • Versatile result oriented professional with 12+ years of experience in Consulting, design, Implementation & support in the domain of Cloud Computing(Azure), End User Computing Virtualization ( DaaS , VDI, Citrix, VMware, Nutanix ), Datacenter and security technologies

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest posts