Difference between revisions of "Resize Windows Disk C Drive"
Jump to navigation
Jump to search
(Created page with "``` $cred = Get-Credential Invoke-Command -ComputerName myhost -ScriptBlock { Update-Disk -Number 0; Resize-Partition -DriveLetter C -Size $(Get-Partitio nSupportedSize -Driv...") |
|||
Line 1: | Line 1: | ||
``` | ``` | ||
$cred = Get-Credential | $cred = Get-Credential | ||
− | Invoke-Command -ComputerName | + | Invoke-Command -ComputerName myhostname -ScriptBlock { Update-Disk -Number 0; Resize-Partition -DriveLetter C -Size $(Get-PartitionSupportedSize -DriveLetter C).SizeMax} -cred $cred |
− | |||
``` | ``` |
Latest revision as of 02:55, 20 June 2021
$cred = Get-Credential Invoke-Command -ComputerName myhostname -ScriptBlock { Update-Disk -Number 0; Resize-Partition -DriveLetter C -Size $(Get-PartitionSupportedSize -DriveLetter C).SizeMax} -cred $cred