Skip to content

Commit

Permalink
run updates on nano
Browse files Browse the repository at this point in the history
  • Loading branch information
mwrock committed Sep 27, 2016
1 parent 4773174 commit ba4f4b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/nano_cleanup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Import-Module C:\windows\system32\windowspowershell\v1.0\Modules\Microsoft.Power
Import-Module C:\windows\system32\windowspowershell\v1.0\Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1
Import-Module C:\windows\system32\windowspowershell\v1.0\Modules\Storage\Storage.psd1

$sess = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
Invoke-CimMethod -InputObject $sess -MethodName ApplyApplicableUpdates

Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

$partition = Get-Partition -DriveLetter C
$c_size = $partition.size
$partition = Get-Partition -DriveLetter D
Expand Down

0 comments on commit ba4f4b6

Please sign in to comment.