Commit 203efbf authored and committed Jan 22, 2018
1 parent 88ec2fb commit 203efbf Copy full SHA for 203efbf
File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ function Set-TelemetrySetting()
76
76
Set-ItemProperty - Path " HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" - Name " CommercialId" - Value $global :WindowsTelemetryGUID - Force
77
77
}
78
78
79
+ function Resize-OSDrive ()
80
+ {
81
+ $osDrive = ((Get-WmiObject Win32_OperatingSystem).SystemDrive).TrimEnd(" :" )
82
+ $size = (Get-Partition - DriveLetter $osDrive ).Size
83
+ $maxSize = (Get-PartitionSupportedSize - DriveLetter $osDrive ).SizeMax
84
+ if ($size -lt $maxSize )
85
+ {
86
+ Resize-Partition - DriveLetter $osDrive - Size $maxSize
87
+ }
88
+ }
89
+
79
90
function
80
91
Get-KubeBinaries ()
81
92
{
369
380
Write-Log " apply telemetry data setting"
370
381
Set-TelemetrySetting
371
382
383
+ Write-Log " resize os drive if possible"
384
+ Resize-OSDrive
385
+
372
386
Write-Log " download kubelet binaries and unzip"
373
387
Get-KubeBinaries
374
388
You can’t perform that action at this time.
0 commit comments