Resize Windows Disk C Drive

From UVOO Tech Wiki
Jump to navigation Jump to search
$cred = Get-Credential
Invoke-Command -ComputerName  myhostname -ScriptBlock { Update-Disk -Number 0; Resize-Partition -DriveLetter C -Size $(Get-PartitionSupportedSize -DriveLetter C).SizeMax} -cred $cred