Files
Docker-IIS-Slim/shrink-image.ps1
Tommy Parnell 31a74f7ce8 init files
2016-10-07 09:54:51 -04:00

16 lines
845 B
PowerShell

iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y boxstarter
BoxstarterShell
Remove-WindowsFeature -Name 'Powershell-ISE'
Get-WindowsFeature |
? { $_.InstallState -eq 'Available' } |
Uninstall-WindowsFeature -Remove
Install-WindowsUpdate -AcceptEula
$pageFileMemoryKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
Set-ItemProperty -Path $pageFileMemoryKey -Name PagingFiles -Value ""
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Optimize-volume -DriveLetter c
wget http://download.sysinternals.com/files/SDelete.zip -OutFile sdelete.zip
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")
[System.IO.Compression.ZipFile]::ExtractToDirectory("sdelete.zip", ".")
./sdelete.exe /accepteula -z c: