8a999fdd58
Big features: - Reliably start WinRM now!! - Support Windows 10 x86! Smaller features - Improve README - Don't power off the (virtual) monitor to save power - Add Invoke-ScriptblockAndCatch and use it in postinstall scripts Fixes and reorgs: - Move all the packer stuff inside the packer/ directory - Break out possibly-nonfunctional slipstream stuff to its own module - Clean up broken bits in buildlab - Clean up vestigial bits in wintriallab-postinstall - Fix lots of broken pieces after encountering them one by one - Fix RestartAction stuff in autounattend-postinstall
32 lines
1.1 KiB
PowerShell
32 lines
1.1 KiB
PowerShell
<#
|
|
Fucking Packer is giving me problems with its shell, windows-shell, and powershell provisioners, so fuck it
|
|
Don't require parameters - it won't run with parameters during post install. This is just for clarity & ease of debugging
|
|
#>
|
|
[cmdletbinding()] param(
|
|
$packerBuildName = ${env:PACKER_BUILD_NAME},
|
|
$packerBuilderType = ${env:PACKER_BUILDER_TYPE}
|
|
)
|
|
$errorActionPreference = "stop"
|
|
import-module $PSScriptRoot\wintriallab-postinstall.psm1
|
|
Invoke-ScriptblockAndCatch -scriptBlock {
|
|
Write-EventLogWrapper "PostInstall for packer build '$packerBuildName' of type '$packerBuilderType'"
|
|
Install-SevenZip
|
|
Disable-AutoAdminLogon
|
|
Enable-RDP
|
|
Install-Chocolatey
|
|
|
|
$suoParams = @{
|
|
ShowHiddenFiles = $true
|
|
ShowSystemFiles = $true
|
|
ShowFileExtensions = $true
|
|
ShowStatusBar = $true
|
|
DisableSharingWizard = $true
|
|
EnablePSOnWinX = $true
|
|
EnableQuickEdit = $true
|
|
}
|
|
Set-UserOptions @suoParams
|
|
|
|
Install-CompiledDotNetAssemblies # Takes about 15 minutes for me
|
|
Compress-WindowsInstall # Takes maybe another 15 minutes
|
|
}
|