mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 10:28:00 +08:00
Merge remote-tracking branch 'upstream/main' into main
This commit is contained in:
@@ -128,11 +128,7 @@ if (Test-IsWin19) {
|
||||
}
|
||||
|
||||
# Expand disk size of OS drive
|
||||
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
|
||||
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
|
||||
|
||||
$expandResult = (diskpart /s 'd:\cmds.txt')
|
||||
Write-Host $expandResult
|
||||
|
||||
Write-Host "Disk sizes after expansion"
|
||||
wmic logicaldisk get size,freespace,caption
|
||||
$driveLetter = "C"
|
||||
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
|
||||
Resize-Partition -DriveLetter $driveLetter -Size $size.SizeMax
|
||||
Get-Volume | Select-Object DriveLetter, SizeRemaining, Size | Sort-Object DriveLetter
|
||||
Reference in New Issue
Block a user