├── .gitattributes
├── .gitignore
├── README.md
├── answer
├── eval-win10
│ └── autounattend.xml
├── eval-win2008r2
│ └── datacenter
│ │ └── autounattend.xml
├── eval-win2012r2
│ └── autounattend.xml
├── eval-win2016
│ └── datacenter
│ │ └── autounattend.xml
└── eval-win2019
│ └── datacenter
│ └── autounattend.xml
├── floppy
├── 00-run-all-scripts.ps1
├── disable-windows-update.ps1
├── install-winrm.ps1
├── power-settings.ps1
└── zz-start-transports.ps1
├── iso
└── .keep
├── script
├── cleanup.ps1
├── uninstall_windows_defender.ps1
├── virtualbox.ps1
├── vmware.ps1
└── windows_update.ps1
├── stage
├── windows-box.json
├── windows-sysprep.json
└── windows-update.json
├── vagrantfile-windows.tpl
├── win10-eval.json
├── win2008r2-eval.json
├── win2012r2-eval.json
├── win2016-eval.json
├── win2019-eval.json
├── windows.json
└── wsim
├── eval-win10
└── install_Windows 10 Enterprise Evaluation.clg
├── eval-win2008r2
├── install_Windows Server 2008 R2 SERVERDATACENTER.clg
├── install_Windows Server 2008 R2 SERVERDATACENTERCORE.clg
├── install_Windows Server 2008 R2 SERVERENTERPRISE.clg
├── install_Windows Server 2008 R2 SERVERENTERPRISECORE.clg
├── install_Windows Server 2008 R2 SERVERSTANDARD.clg
├── install_Windows Server 2008 R2 SERVERSTANDARDCORE.clg
├── install_Windows Server 2008 R2 SERVERWEB.clg
└── install_Windows Server 2008 R2 SERVERWEBCORE.clg
├── eval-win2012r2
├── install_Windows Server 2012 R2 SERVERDATACENTER.clg
├── install_Windows Server 2012 R2 SERVERDATACENTERCORE.clg
├── install_Windows Server 2012 R2 SERVERSTANDARD.clg
└── install_Windows Server 2012 R2 SERVERSTANDARDCORE.clg
├── eval-win2016
├── install_Windows Server 2016 SERVERDATACENTER.clg
├── install_Windows Server 2016 SERVERDATACENTERCORE.clg
├── install_Windows Server 2016 SERVERSTANDARD.clg
└── install_Windows Server 2016 SERVERSTANDARDCORE.clg
└── eval-win2019
├── install_Windows Server 2019 SERVERDATACENTER.clg
├── install_Windows Server 2019 SERVERDATACENTERCORE.clg
├── install_Windows Server 2019 SERVERSTANDARD.clg
└── install_Windows Server 2019 SERVERSTANDARDCORE.clg
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Detect text files automatically
2 | * text=auto
3 |
4 | # Force Unix-style line endings on these files
5 | *.sh eol=lf
6 | ks.cfg eol=lf
7 | preseed.cfg eol=lf
8 |
9 | # Force CRLF line endings on these files
10 | *.bat text eol=crlf
11 | *.cmd text eol=crlf
12 | *.ps1 text eol=crlf
13 | Autounattend.xml text eol=crlf
14 |
15 | # These files are binary
16 | *.cer binary
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .keep_known_hosts
2 | packer_cache/
3 | output-*
4 | *.box
5 | *.tar.gz
6 | iso
7 | crash.log
8 | tmp
9 | .vagrant/
10 | *.swp
11 | Makefile.local
12 |
13 | .DS_Store
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Packer templates for Windows written in legacy JSON
2 |
3 | ### Overview
4 |
5 | For more information on how the `autounattend.xml` files were created, refer to: https://sheska.com/how-to-create-an-automated-install-for-windows-server-2019/
6 |
7 | Developing some Windows templates. Nothing to see here yet. In progress work.
8 |
--------------------------------------------------------------------------------
/answer/eval-win10/autounattend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | en-US
6 | en-US
7 | en-US
8 | en-US
9 |
10 |
11 |
12 |
13 |
14 |
15 | /IMAGE/NAME
16 | Windows 10 Enterprise Evaluation
17 |
18 |
19 |
20 | 0
21 | 2
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 |
32 | 1
33 | 500
34 | Primary
35 |
36 |
37 | true
38 | 2
39 | Primary
40 |
41 |
42 |
43 |
44 | true
45 | NTFS
46 |
47 | 1
48 | 1
49 |
50 |
51 | NTFS
52 |
53 | C
54 | 2
55 | 2
56 |
57 |
58 | 0
59 | true
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | true
68 | true
69 | true
70 | true
71 | true
72 | true
73 | true
74 |
75 |
76 |
77 | powershell -NoLogo -ExecutionPolicy RemoteSigned -File a:\00-run-all-scripts.ps1
78 | Run Sysprep scripts
79 | 10
80 | true
81 |
82 |
83 |
84 |
85 |
86 |
87 | vagrant
88 | true
89 |
90 | Vagrant User
91 | Administrators
92 | vagrant
93 |
94 |
95 |
96 |
97 |
98 | vagrant
99 | true
100 |
101 | true
102 | vagrant
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/answer/eval-win2008r2/datacenter/autounattend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | en-US
6 | en-US
7 | en-US
8 | en-US
9 |
10 |
11 |
12 |
13 |
14 |
15 | /IMAGE/NAME
16 | Windows Server 2008 R2 SERVERDATACENTER
17 |
18 |
19 |
20 | 0
21 | 2
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 | OnError
30 |
31 |
32 |
33 | 1
34 | 500
35 | Primary
36 |
37 |
38 | 2
39 | 20000
40 | Primary
41 |
42 |
43 |
44 |
45 | true
46 | true
47 | NTFS
48 | C
49 | 1
50 | 2
51 |
52 |
53 | 0
54 | true
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | vagrant
64 | true
65 |
66 |
67 |
68 |
69 | vagrant
70 | true
71 |
72 | Vagrant User
73 | vagrant
74 | Administrators
75 | vagrant
76 |
77 |
78 |
79 |
80 |
81 | vagrant
82 | true
83 |
84 | vagrant
85 | true
86 |
87 |
88 |
89 | cmd.exe /c powershell -NoLogo -ExecutionPolicy RemoteSigned -File a:\00-run-all-scripts.ps1
90 | Run scripts during the sysprep phase
91 | 10
92 | true
93 |
94 |
95 |
96 |
97 |
98 |
99 | false
100 |
101 |
102 |
103 |
104 | true
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/answer/eval-win2012r2/autounattend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | en-US
6 | en-US
7 | en-US
8 | en-US
9 |
10 |
11 |
12 |
13 |
14 |
15 | /IMAGE/NAME
16 | Windows Server 2012 R2 SERVERDATACENTER
17 |
18 |
19 |
20 | 0
21 | 2
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 |
32 | 1
33 | 500
34 | Primary
35 |
36 |
37 | true
38 | 2
39 | Primary
40 |
41 |
42 |
43 |
44 | true
45 | NTFS
46 |
47 | 1
48 | 1
49 |
50 |
51 | NTFS
52 |
53 | C
54 | 2
55 | 2
56 |
57 |
58 | 0
59 | true
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | vagrant
69 | true
70 |
71 | true
72 | vagrant
73 |
74 |
75 |
76 | vagrant
77 | true
78 |
79 |
80 |
81 |
82 | vagrant
83 | true
84 |
85 | Vagrant User
86 | Administrators
87 | vagrant
88 |
89 |
90 |
91 |
92 |
93 | powershell -NoLogo -ExecutionPolicy RemoteSigned -File a:\00-run-all-scripts.ps1
94 | Run scripts during sysprep
95 | 10
96 | true
97 |
98 |
99 |
100 |
101 |
102 |
103 | true
104 |
105 |
106 | false
107 | false
108 |
109 |
110 | true
111 | true
112 | about:blank
113 |
114 |
115 | false
116 |
117 |
118 |
119 |
120 | true
121 | Remote Desktop
122 | all
123 |
124 |
125 |
126 |
127 | 0
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/answer/eval-win2016/datacenter/autounattend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | en-US
6 | en-US
7 | en-US
8 | en-US
9 |
10 |
11 |
12 |
13 |
14 |
15 | /IMAGE/NAME
16 | Windows Server 2016 SERVERDATACENTER
17 |
18 |
19 |
20 | 0
21 | 2
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 |
32 | 1
33 | 500
34 | Primary
35 |
36 |
37 | true
38 | 2
39 | Primary
40 |
41 |
42 |
43 |
44 | true
45 | NTFS
46 |
47 | 1
48 | 1
49 |
50 |
51 | NTFS
52 |
53 | C
54 | 2
55 | 2
56 |
57 |
58 | 0
59 | true
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | vagrant
69 | true
70 |
71 |
72 |
73 |
74 | vagrant
75 | true
76 |
77 | Administrators
78 | Vagrant
79 | vagrant
80 | Vagrant User
81 |
82 |
83 |
84 |
85 |
86 | vagrant
87 | true
88 |
89 | true
90 | vagrant
91 |
92 |
93 |
94 | powershell -NoLogo -ExecutionPolicy RemoteSigned -File a:\00-run-all-scripts.ps1
95 | Run all scripts on drive A:
96 | true
97 | 10
98 |
99 |
100 |
101 |
102 |
103 |
104 | true
105 |
106 |
107 | false
108 | false
109 |
110 |
111 | true
112 | true
113 | about:blank
114 |
115 |
116 | false
117 |
118 |
119 |
120 |
121 | true
122 | Remote Desktop
123 | all
124 |
125 |
126 |
127 |
128 | 1
129 | 0
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/answer/eval-win2019/datacenter/autounattend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | en-US
6 | en-US
7 | en-US
8 | en-US
9 |
10 |
11 |
12 |
13 |
14 |
15 | /IMAGE/NAME
16 | Windows Server 2019 SERVERDATACENTER
17 |
18 |
19 |
20 | 0
21 | 2
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 |
32 | 1
33 | 500
34 | Primary
35 |
36 |
37 | 2
38 | 20000
39 | Primary
40 |
41 |
42 |
43 |
44 | true
45 | NTFS
46 |
47 | 1
48 | 1
49 |
50 |
51 | true
52 | NTFS
53 | C
54 | 2
55 | 2
56 |
57 |
58 | 0
59 | true
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | vagrant
69 | true
70 |
71 |
72 |
73 |
74 | vagrant
75 | true
76 |
77 | Administrators
78 | Vagrant
79 | vagrant
80 | Vagrant User
81 |
82 |
83 |
84 |
85 |
86 | vagrant
87 | true
88 |
89 | true
90 | vagrant
91 |
92 |
93 |
94 | powershell -NoLogo -ExecutionPolicy RemoteSigned -File a:\00-run-all-scripts.ps1
95 | Run all scripts on drive A:
96 | 10
97 | true
98 |
99 |
100 |
101 |
102 |
103 |
104 | true
105 |
106 |
107 | false
108 | false
109 |
110 |
111 | false
112 |
113 |
114 |
115 |
116 | true
117 | Remote Desktop
118 | all
119 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/floppy/00-run-all-scripts.ps1:
--------------------------------------------------------------------------------
1 | $ScriptPath = Split-Path $MyInvocation.InvocationName
2 | & "$ScriptPath\disable-windows-update.ps1"
3 | & "$ScriptPath\install-winrm.ps1"
4 | & "$ScriptPath\power-settings.ps1"
5 | & "$ScriptPath\zz-start-transports.ps1"
6 |
--------------------------------------------------------------------------------
/floppy/disable-windows-update.ps1:
--------------------------------------------------------------------------------
1 | Write-Output "==> Disabling Windows Update..."
2 | stop-service wuauserv
3 | ® add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f
4 | ® add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f
5 |
6 | $mu = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
7 | $result = $mu.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
8 |
9 | start-service wuauserv
10 |
--------------------------------------------------------------------------------
/floppy/install-winrm.ps1:
--------------------------------------------------------------------------------
1 | $host.ui.RawUI.WindowTitle = "Enabling Windows Remote Management. Please wait..."
2 |
3 | Write-Output "==> Supressing network location prompt"
4 | New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force
5 |
6 | Write-Output "==> Setting network to private"
7 | $ifaceinfo = Get-NetConnectionProfile
8 | Set-NetConnectionProfile -InterfaceIndex $ifaceinfo.InterfaceIndex -NetworkCategory Private
9 |
10 | # Enable-PsRemoting -Force -SkipNetworkProfileCheck
11 | winrm quickconfig -q
12 | winrm s "winrm/config" '@{MaxTimeoutms="1800000"}'
13 | winrm s "winrm/config/winrs" '@{MaxMemoryPerShellMB="2048"}'
14 | winrm s "winrm/config/service" '@{AllowUnencrypted="true"}'
15 | winrm s "winrm/config/service/auth" '@{Basic="true"}'
16 |
17 | Get-Service winrm | Stop-Service
18 |
19 | Write-Output "==> Enable WinRM firewall rule"
20 | Enable-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)"
21 |
22 | # Write-Output -NoNewLine 'Press any key to continue...'
23 | # $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
24 |
--------------------------------------------------------------------------------
/floppy/power-settings.ps1:
--------------------------------------------------------------------------------
1 | Write-Output "==> Changing the power savings settings"
2 |
3 | $PowerConfiguration = "High Performance"
4 | Write-Output "Setting power plan to $PowerConfiguration"
5 | $guid = (Get-WmiObject -Class win32_powerplan -Namespace root\cimv2\power -Filter "ElementName='$PowerConfiguration'").InstanceID.tostring()
6 | $regex = [regex]"{(.*?)}$"
7 | $newPower = $regex.Match($guid).groups[1].value
8 | powercfg -setactive $newPower
9 |
10 | Write-Output "Setting standby timeout to never"
11 | powercfg -Change -standby-timeout-ac 0
12 | Write-Output "Setting monitor timeout to never"
13 | powercfg -Change -monitor-timeout-ac 0
14 |
--------------------------------------------------------------------------------
/floppy/zz-start-transports.ps1:
--------------------------------------------------------------------------------
1 | Write-Output "=> Starting Transport Services"
2 | net start winrm
3 |
--------------------------------------------------------------------------------
/iso/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/iso/.keep
--------------------------------------------------------------------------------
/script/cleanup.ps1:
--------------------------------------------------------------------------------
1 | Write-Host "Cleaning updates.."
2 | Stop-Service -Name wuauserv -Force
3 | Remove-Item c:\Windows\SoftwareDistribution\Download\* -Recurse -Force
4 | Start-Service -Name wuauserv
5 |
6 | Write-Host "Cleaning SxS..."
7 | Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
8 |
9 | @(
10 | "$env:localappdata\Nuget",
11 | "$env:localappdata\temp\*",
12 | "$env:windir\logs",
13 | "$env:windir\panther",
14 | "$env:windir\temp\*",
15 | "$env:windir\winsxs\manifestcache",
16 | "C:\Recovery"
17 | ) | % {
18 | if(Test-Path $_) {
19 | Write-Host "Removing $_"
20 | try {
21 | Takeown /d Y /R /f $_
22 | Icacls $_ /GRANT:r administrators:F /T /c /q 2>&1 | Out-Null
23 | Remove-Item $_ -Recurse -Force | Out-Null
24 | } catch { $global:error.RemoveAt(0) }
25 | }
26 | }
27 |
28 | Write-Host "Cleaning all event logs..."
29 | @(
30 | "Application",
31 | "Security",
32 | "Setup",
33 | "System"
34 | ) | % {
35 | wevtutil clear-log $_
36 | }
37 |
38 | Write-Host "Removing pagefile..."
39 | Set-Itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management' -Name 'PagingFiles' -value ''
40 |
41 | Write-Host "Zeroing out empty space..."
42 | $FilePath="c:\zero.tmp"
43 | $Volume = Get-WmiObject win32_logicaldisk -filter "DeviceID='C:'"
44 | $ArraySize= 64kb
45 | $SpaceToLeave= $Volume.Size * 0.05
46 | $FileSize= $Volume.FreeSpace - $SpacetoLeave
47 | $ZeroArray= new-object byte[]($ArraySize)
48 |
49 | $Stream= [io.File]::OpenWrite($FilePath)
50 | try {
51 | $CurFileSize = 0
52 | while($CurFileSize -lt $FileSize) {
53 | $Stream.Write($ZeroArray,0, $ZeroArray.Length)
54 | $CurFileSize +=$ZeroArray.Length
55 | }
56 | }
57 | finally {
58 | if($Stream) {
59 | $Stream.Close()
60 | }
61 | }
62 |
63 | Del $FilePath
64 |
--------------------------------------------------------------------------------
/script/uninstall_windows_defender.ps1:
--------------------------------------------------------------------------------
1 | Uninstall-WindowsFeature Windows-Defender
2 |
--------------------------------------------------------------------------------
/script/virtualbox.ps1:
--------------------------------------------------------------------------------
1 | If ("$Env:PACKER_BUILDER_TYPE" -ne "virtualbox-iso") {
2 | Write-Host "VirtualBox not found, aborting guest additions install..."
3 | return
4 | }
5 |
6 | Write-Host "Installing VirtualBox guest additions"
7 |
8 | md -Force "C:\Windows\Temp\virtualbox"
9 |
10 | Get-ChildItem E:/cert/ -Filter vbox*.cer | ForEach-Object {
11 | E:/cert/VBoxCertUtil.exe add-trusted-publisher $_.FullName --root $_.FullName
12 | }
13 |
14 | Start-Process -FilePath "e:/VBoxWindowsAdditions.exe" -ArgumentList "/S" -WorkingDirectory "C:/Windows/Temp/virtualbox" -Wait
15 |
--------------------------------------------------------------------------------
/script/vmware.ps1:
--------------------------------------------------------------------------------
1 | If ("$Env:PACKER_BUILDER_TYPE" -ne "vmware-iso") {
2 | Write-Host "==> VMware not found, aborting tools install.."
3 | return
4 | }
5 |
6 | Write-Host "==> Installing VMware tools"
7 |
8 | $url = "https://packages.vmware.com/tools/releases/latest/windows/x64/VMware-tools-10.3.5-10430147-x86_64.exe"
9 | # $url = "https://packages.vmware.com/tools/releases/10.2.5/windows/x64/VMware-tools-10.2.5-8068406-x86_64.exe"
10 | $vmware_setup = "$($env:TEMP)\vmware_setup.exe"
11 | Write-Host "Downloading VMware Tools..."
12 | $wc = New-Object System.Net.WebClient
13 | $wc.DownloadFile($url, $vmware_setup)
14 |
15 | Write-Host "Installing VMWare Tools..."
16 | # $p = Start-Process -Wait -PassThru -FilePath d:\setup.exe -ArgumentList "/S /l C:\Windows\Temp\vmware_tools.log /v""/qn REBOOT=R"""
17 | $p = Start-Process -Wait -PassThru -FilePath $vmware_setup -ArgumentList "/S /l C:\Windows\Temp\vmware_tools.log /v""/qn REBOOT=R"""
18 |
19 | if ($p.ExitCode -eq 0) {
20 | Write-Host "Done."
21 | } elseif ($p.ExitCode -eq 3010) {
22 | Write-Host "Done, but a reboot is necessary."
23 | } else {
24 | Write-Host "VMWare Tools install failed: ExitCode=$($p.ExitCode), Log=C:\Windows\Temp\vmware_tools.log"
25 | Start-Sleep 2; exit $p.ExitCode
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/script/windows_update.ps1:
--------------------------------------------------------------------------------
1 | # Sleep 90000
2 |
3 | if (-not ([string]::IsNullOrEmpty($env:WINHTTP_PROXY)))
4 | {
5 | Write-Host "==> Setting winhttp proxy to $($env:WINHTTP_PROXY)"
6 | netsh winhttp set proxy $env:WINHTTP_PROXY
7 | } else {
8 | Write-Host "==> No winhttp proxy specified"
9 | }
10 |
11 | # Silence progress bars in PowerShell, which can sometimes feed back strange
12 | # XML data to the Packer output.
13 | $ProgressPreference = "SilentlyContinue"
14 |
15 | Write-Output "Starting PSWindowsUpdate Installation"
16 | # Install PSWindowsUpdate for scriptable Windows Updates
17 | $webDeployURL = "https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/66095/1/PSWindowsUpdate_1.4.5.zip"
18 | $filePath = "$($env:TEMP)\PSWindowsUpdate.zip"
19 |
20 | (New-Object System.Net.WebClient).DownloadFile($webDeployURL, $filePath)
21 |
22 | # Older versions of Powershell do not have 'Expand Archive'
23 | # Use Shell.Application custom object to unzip
24 | # https://stackoverflow.com/questions/27768303/how-to-unzip-a-file-in-powershell
25 | $shell = New-Object -ComObject Shell.Application
26 | $zipFile = $shell.NameSpace($filePath)
27 | $PSVersion = $PSVersionTable.PSVersion.Major
28 | if ($PSVersion -lt 3) {
29 | $destinationFolder = $shell.NameSpace("C:\Windows\system32\WindowsPowerShell\v1.0\Modules")
30 | } else {
31 | $destinationFolder = $shell.NameSpace("C:\Program Files\WindowsPowerShell\Modules")
32 | }
33 |
34 | $copyFlags = 0x00
35 | $copyFlags += 0x04 # Hide progress dialogs
36 | $copyFlags += 0x10 # Overwrite existing files
37 |
38 | $destinationFolder.CopyHere($zipFile.Items(), $copyFlags)
39 | # Clean up
40 | Remove-Item -Force -Path $filePath
41 |
42 | Write-Output "Ended PSWindowsUpdate Installation"
43 |
44 | Write-Output "Starting Windows Update Installation"
45 |
46 | Try
47 | {
48 | Import-Module PSWindowsUpdate -ErrorAction Stop
49 | }
50 | Catch
51 | {
52 | Write-Error "Unable to install PSWindowsUpdate"
53 | exit 1
54 | }
55 |
56 | if (Test-Path C:\Windows\Temp\PSWindowsUpdate.log) {
57 | # Save old logs
58 | Rename-Item -Path C:\Windows\Temp\PSWindowsUpdate.log -NewName PSWindowsUpdate-$((Get-Date).Ticks).log
59 |
60 | # Uncomment the line below to delete old logs instead
61 | #Remove-Item -Path C:\Windows\Temp\PSWindowsUpdate.log
62 | }
63 |
64 | try {
65 | $updateCommand = {ipmo PSWindowsUpdate; Get-WUInstall -AcceptAll -IgnoreReboot | Out-File C:\Windows\Temp\PSWindowsUpdate.log}
66 | $TaskName = "PackerUpdate"
67 |
68 | $User = [Security.Principal.WindowsIdentity]::GetCurrent()
69 | $Scheduler = New-Object -ComObject Schedule.Service
70 |
71 | $Task = $Scheduler.NewTask(0)
72 |
73 | $RegistrationInfo = $Task.RegistrationInfo
74 | $RegistrationInfo.Description = $TaskName
75 | $RegistrationInfo.Author = $User.Name
76 |
77 | $Settings = $Task.Settings
78 | $Settings.Enabled = $True
79 | $Settings.StartWhenAvailable = $True
80 | $Settings.Hidden = $False
81 |
82 | $Action = $Task.Actions.Create(0)
83 | $Action.Path = "powershell"
84 | $Action.Arguments = "-Command $updateCommand"
85 |
86 | $Task.Principal.RunLevel = 1
87 |
88 | $Scheduler.Connect()
89 | $RootFolder = $Scheduler.GetFolder("\")
90 | $RootFolder.RegisterTaskDefinition($TaskName, $Task, 6, "SYSTEM", $Null, 1) | Out-Null
91 | $RootFolder.GetTask($TaskName).Run(0) | Out-Null
92 |
93 | Write-Output "The Windows Update log will be displayed below this message. No additional output indicates no updates were needed."
94 | do {
95 | sleep 1
96 | if ((Test-Path C:\Windows\Temp\PSWindowsUpdate.log) -and $script:reader -eq $null) {
97 | $script:stream = New-Object System.IO.FileStream -ArgumentList "C:\Windows\Temp\PSWindowsUpdate.log", "Open", "Read", "ReadWrite"
98 | $script:reader = New-Object System.IO.StreamReader $stream
99 | }
100 | if ($script:reader -ne $null) {
101 | $line = $Null
102 | do {$script:reader.ReadLine()
103 | $line = $script:reader.ReadLine()
104 | Write-Output $line
105 | } while ($line -ne $null)
106 | }
107 | } while ($Scheduler.GetRunningTasks(0) | Where-Object {$_.Name -eq $TaskName})
108 | } finally {
109 | $RootFolder.DeleteTask($TaskName,0)
110 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($Scheduler) | Out-Null
111 | if ($script:reader -ne $null) {
112 | $script:reader.Close()
113 | $script:stream.Dispose()
114 | }
115 | }
116 | Write-Output "Ended Windows Update Installation"
--------------------------------------------------------------------------------
/stage/windows-box.json:
--------------------------------------------------------------------------------
1 | {
2 | "builders": [
3 | {
4 | "communicator": "winrm",
5 | "output_directory": "output-{{ user `vm_name` }}-vmware-iso",
6 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
7 | "shutdown_timeout": "1h",
8 | "source_path": "{{ user `source_path` }}",
9 | "type": "vmware-vmx",
10 | "vm_name": "{{ user `vm_name` }}",
11 | "vmx_data": {
12 | "ethernet0.addresstype": "generated",
13 | "ethernet0.bsdname": "en0",
14 | "ethernet0.connectiontype": "nat",
15 | "ethernet0.displayname": "Ethernet",
16 | "ethernet0.linkstatepropagation.enable": "FALSE",
17 | "ethernet0.pcislotnumber": "33",
18 | "ethernet0.present": "TRUE",
19 | "ethernet0.virtualdev": "e1000",
20 | "ethernet0.vnet": "",
21 | "ethernet0.wakeonpcktrcv": "FALSE"
22 | },
23 | "vmx_remove_ethernet_interfaces": true,
24 | "winrm_password": "{{ user `winrm_password` }}",
25 | "winrm_timeout": "12h",
26 | "winrm_username": "{{ user `winrm_username` }}"
27 | }
28 | ],
29 | "post-processors": [
30 | {
31 | "compression_level": 9,
32 | "keep_input_artifact": false,
33 | "output": "box/{{.Provider}}/{{user `vm_name`}}.box",
34 | "type": "vagrant",
35 | "vagrantfile_template": "vagrantfile-windows.tpl"
36 | }
37 | ],
38 | "provisioners": [
39 | {
40 | "elevated_user": "{{ user `winrm_username` }}",
41 | "elevated_password": "{{ user `winrm_password` }}",
42 | "scripts": [
43 | "script/cleanup.ps1"
44 | ],
45 | "type": "powershell"
46 | }
47 | ],
48 | "variables": {
49 | "source_path": "output-eval-win2019-datacenter-windows-update-vmware-iso/eval-win2019-datacenter-windows-update.vmx",
50 | "vm_name": "eval-win2019-datacenter",
51 | "winrm_password": "vagrant",
52 | "winrm_username": "vagrant"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/stage/windows-sysprep.json:
--------------------------------------------------------------------------------
1 | {
2 | "builders": [
3 | {
4 | "communicator": "winrm",
5 | "disk_size": "{{ user `disk_size` }}",
6 | "floppy_files": [
7 | "{{ user `autounattend` }}",
8 | "floppy/00-run-all-scripts.ps1",
9 | "floppy/disable-windows-update.ps1",
10 | "floppy/install-winrm.ps1",
11 | "floppy/power-settings.ps1",
12 | "floppy/zz-start-transports.ps1"
13 | ],
14 | "guest_os_type": "{{ user `guest_os_type` }}",
15 | "headless": "{{ user `headless` }}",
16 | "iso_checksum": "{{ user `iso_checksum` }}",
17 | "iso_checksum_type": "{{ user `iso_checksum_type` }}",
18 | "iso_urls": [
19 | "{{ user `iso_path` }}/{{ user `iso_name` }}",
20 | "{{ user `iso_url` }}"
21 | ],
22 | "output_directory": "output-{{ user `vm_name` }}-vmware-iso",
23 | "shutdown_command": "{{ user `shutdown_command`}}",
24 | "tools_upload_flavor": "",
25 | "type": "vmware-iso",
26 | "vm_name": "{{ user `vm_name` }}",
27 | "vmx_data": {
28 | "cpuid.coresPerSocket": "1",
29 | "memsize": "{{ user `memory` }}",
30 | "numvcpus": "{{ user `cpus` }}",
31 | "scsi0.virtualDev": "lsisas1068",
32 | "virtualHW.version": "{{ user `virtual_hw_version` }}"
33 | },
34 | "winrm_password": "{{ user `winrm_password` }}",
35 | "winrm_timeout": "10000s",
36 | "winrm_username": "{{ user `winrm_username` }}"
37 | }
38 | ],
39 | "provisioners": [
40 | {
41 | "elevated_user": "{{ user `winrm_username` }}",
42 | "elevated_password": "{{ user `winrm_password` }}",
43 | "scripts": [
44 | "script/vmware.ps1"
45 | ],
46 | "type": "powershell"
47 | },
48 | {
49 | "type": "windows-restart"
50 | },
51 | {
52 | "type": "powershell",
53 | "inline": ["sleep 20"]
54 | },
55 | {
56 | "type": "windows-restart"
57 | },
58 | {
59 | "type": "powershell",
60 | "inline": ["sleep 20"]
61 | },
62 | {
63 | "elevated_user": "{{ user `winrm_username` }}",
64 | "elevated_password": "{{ user `winrm_password` }}",
65 | "scripts": [
66 | "script/cleanup.ps1"
67 | ],
68 | "type": "powershell"
69 | }
70 | ],
71 | "variables": {
72 | "autounattend": "floppy/eval-win2016/datacenter/autounattend.xml",
73 | "cpus": "2",
74 | "disk_size": "40000",
75 | "guest_os_type": "windows9srv-64",
76 | "iso_checksum": "1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f",
77 | "iso_checksum_type": "sha256",
78 | "iso_name": "Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
79 | "iso_path": "iso",
80 | "iso_url": "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
81 | "memory": "4096",
82 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
83 | "virtual_hw_version": "9",
84 | "vm_name": "eval-win2016-datacenter-sysprep",
85 | "winrm_password": "vagrant",
86 | "winrm_username": "vagrant"
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/stage/windows-update.json:
--------------------------------------------------------------------------------
1 | {
2 | "builders": [
3 | {
4 | "communicator": "winrm",
5 | "output_directory": "output-{{ user `vm_name` }}-vmware-iso",
6 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
7 | "shutdown_timeout": "1h",
8 | "source_path": "{{ user `source_path` }}",
9 | "type": "vmware-vmx",
10 | "vm_name": "{{ user `vm_name` }}",
11 | "winrm_password": "{{ user `winrm_password` }}",
12 | "winrm_timeout": "12h",
13 | "winrm_username": "{{ user `winrm_username` }}"
14 | }
15 | ],
16 | "provisioners": [
17 | {
18 | "elevated_user": "{{ user `winrm_username` }}",
19 | "elevated_password": "{{ user `winrm_password` }}",
20 | "scripts": [
21 | "script/windows_update.ps1"
22 | ],
23 | "type": "powershell"
24 | },
25 | {
26 | "restart_timeout": "1h",
27 | "type": "windows-restart"
28 | },
29 | {
30 | "elevated_user": "{{ user `winrm_username` }}",
31 | "elevated_password": "{{ user `winrm_password` }}",
32 | "scripts": [
33 | "script/windows_update.ps1"
34 | ],
35 | "type": "powershell"
36 | },
37 | {
38 | "restart_timeout": "1h",
39 | "type": "windows-restart"
40 | },
41 | {
42 | "elevated_user": "{{ user `winrm_username` }}",
43 | "elevated_password": "{{ user `winrm_password` }}",
44 | "scripts": [
45 | "script/windows_update.ps1"
46 | ],
47 | "type": "powershell"
48 | },
49 | {
50 | "restart_timeout": "1h",
51 | "type": "windows-restart"
52 | },
53 | {
54 | "elevated_user": "{{ user `winrm_username` }}",
55 | "elevated_password": "{{ user `winrm_password` }}",
56 | "scripts": [
57 | "script/windows_update.ps1"
58 | ],
59 | "type": "powershell"
60 | },
61 | {
62 | "restart_timeout": "1h",
63 | "type": "windows-restart"
64 | }
65 | ],
66 | "variables": {
67 | "source_path": "output-eval-win2019-datacenter-sysprep-vmware-iso/eval-win2019-datacenter-sysprep.vmx",
68 | "vm_name": "eval-win2019-datacenter-windows-update",
69 | "winrm_password": "vagrant",
70 | "winrm_username": "vagrant"
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vagrantfile-windows.tpl:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 | config.vm.guest = :windows
6 | config.vm.communicator = "winrm"
7 | config.vm.boot_timeout = 300
8 | config.vm.network :forwarded_port, guest: 3389, host: 3389, id: 'rdp', auto_correct: true
9 | config.vm.synced_folder '.', '/vagrant', disabled: true
10 |
11 | ["vmware_fusion", "vmware_workstation"].each do |provider|
12 | config.vm.provider provider do |v, override|
13 | v.gui = true
14 | v.vmx["memsize"] = "4096"
15 | v.vmx["numvcpus"] = "2"
16 | v.vmx["cpuid.coresPerSocket"] = "1"
17 | v.vmx["ethernet0.virtualDev"] = "vmxnet3"
18 | v.vmx["RemoteDisplay.vnc.enabled"] = "false"
19 | v.vmx["RemoteDisplay.vnc.port"] = "5900"
20 | v.vmx["scsi0.virtualDev"] = "lsisas1068"
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/win10-eval.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "Build with `packer build -var-file=win10-eval.json windows.json`",
3 | "vm_name": "win10-eval",
4 | "cpus": "2",
5 | "memory": "4096",
6 | "disk_size": "40000",
7 | "guest_os_type": "windows9-64",
8 | "virtual_hw_version": "10",
9 | "autounattend": "answer/eval-win10/autounattend.xml",
10 | "iso_checksum": "27e4feb9102f7f2b21ebdb364587902a70842fb550204019d1a14b120918e455",
11 | "iso_name": "17134.1.180410-1804.rs4_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
12 | "iso_url": "https://software-download.microsoft.com/download/pr/17134.1.180410-1804.rs4_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso"
13 | }
14 |
--------------------------------------------------------------------------------
/win2008r2-eval.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "Build with `packer build -var-file=win2008r2-eval.json windows.json`",
3 | "vm_name": "win2008r2-eval",
4 | "cpus": "2",
5 | "memory": "4096",
6 | "disk_size": "40000",
7 | "guest_os_type": "windows7srv-64",
8 | "autounattend": "answer/eval-win2008r2/datacenter/autounattend.xml",
9 | "iso_checksum": "30832ad76ccfa4ce48ccb936edefe02079d42fb1da32201bf9e3a880c8ed6312",
10 | "iso_name": "7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso",
11 | "iso_url": "https://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"
12 | }
13 |
--------------------------------------------------------------------------------
/win2012r2-eval.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "Build with `packer build -var-file=win2012r2-eval.json windows.json`",
3 | "vm_name": "win2012r2-eval",
4 | "cpus": "2",
5 | "memory": "4096",
6 | "disk_size": "40000",
7 | "guest_os_type": "windows8srv-64",
8 | "autounattend": "answer/eval-win2012r2/autounattend.xml",
9 | "iso_checksum": "6612b5b1f53e845aacdf96e974bb119a3d9b4dcb5b82e65804ab7e534dc7b4d5",
10 | "iso_name": "9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO",
11 | "iso_url": "http://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
12 | }
13 |
--------------------------------------------------------------------------------
/win2016-eval.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "Build with `packer build -var-file=win2016-eval.json windows.json`",
3 | "vm_name": "win2016-eval",
4 | "cpus": "2",
5 | "memory": "4096",
6 | "disk_size": "40000",
7 | "guest_os_type": "windows9srv-64",
8 | "autounattend": "answer/eval-win2016/datacenter/autounattend.xml",
9 | "iso_checksum": "1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f",
10 | "iso_name": "Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
11 | "iso_url": "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
12 | }
13 |
--------------------------------------------------------------------------------
/win2019-eval.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "Build with `packer build -var-file=win2019-eval.json windows.json`",
3 | "vm_name": "win2019-eval",
4 | "cpus": "2",
5 | "memory": "4096",
6 | "disk_size": "40000",
7 | "guest_os_type": "windows9srv-64",
8 | "virtual_hw_version": "10",
9 | "autounattend": "answer/eval-win2019/datacenter/autounattend.xml",
10 | "iso_checksum": "57faf4a2ea4484cfdf5e964c539313c061c4d9cac474e723d60405f2ea02d570",
11 | "iso_name": "17763.253.190108-0006.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso",
12 | "iso_url": "https://software-download.microsoft.com/download/sg/17763.253.190108-0006.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
13 | }
14 |
--------------------------------------------------------------------------------
/windows.json:
--------------------------------------------------------------------------------
1 | {
2 | "builders": [
3 | {
4 | "communicator": "winrm",
5 | "cpus": "{{ user `cpus` }}",
6 | "disk_adapter_type": "lsisas1068",
7 | "disk_size": "{{ user `disk_size` }}",
8 | "floppy_files": [
9 | "{{ user `autounattend` }}",
10 | "floppy/00-run-all-scripts.ps1",
11 | "floppy/disable-windows-update.ps1",
12 | "floppy/install-winrm.ps1",
13 | "floppy/power-settings.ps1",
14 | "floppy/zz-start-transports.ps1"
15 | ],
16 | "guest_os_type": "{{ user `guest_os_type` }}",
17 | "headless": "{{ user `headless` }}",
18 | "iso_checksum": "{{ user `iso_checksum` }}",
19 | "iso_checksum_type": "{{ user `iso_checksum_type` }}",
20 | "iso_urls": [
21 | "{{ user `iso_path` }}/{{ user `iso_name` }}",
22 | "{{ user `iso_url` }}"
23 | ],
24 | "memory": "{{ user `memory` }}",
25 | "output_directory": "output-{{ user `vm_name` }}-vmware-iso",
26 | "shutdown_command": "{{ user `shutdown_command`}}",
27 | "tools_upload_flavor": "",
28 | "type": "vmware-iso",
29 | "vm_name": "{{ user `vm_name` }}",
30 | "vmx_data": {
31 | "cpuid.coresPerSocket": "1",
32 | "virtualHW.version": "{{ user `virtual_hw_version` }}"
33 | },
34 | "vmx_remove_ethernet_interfaces": true,
35 | "winrm_password": "{{ user `winrm_password` }}",
36 | "winrm_timeout": "10000s",
37 | "winrm_username": "{{ user `winrm_username` }}"
38 | },
39 | {
40 | "communicator": "winrm",
41 | "cpus": "{{ user `cpus` }}",
42 | "disk_size": "{{ user `disk_size` }}",
43 | "floppy_files": [
44 | "{{ user `autounattend` }}",
45 | "floppy/00-run-all-scripts.ps1",
46 | "floppy/disable-windows-update.ps1",
47 | "floppy/install-winrm.ps1",
48 | "floppy/power-settings.ps1",
49 | "floppy/zz-start-transports.ps1"
50 | ],
51 | "guest_additions_mode": "attach",
52 | "guest_additions_path": "C:/users/vagrant/VBoxGuestAdditions.iso",
53 | "guest_os_type": "Windows2016_64",
54 | "headless": "{{ user `headless` }}",
55 | "iso_checksum": "{{ user `iso_checksum` }}",
56 | "iso_checksum_type": "{{ user `iso_checksum_type` }}",
57 | "iso_urls": [
58 | "{{ user `iso_path` }}/{{ user `iso_name` }}",
59 | "{{ user `iso_url` }}"
60 | ],
61 | "memory": "{{ user `memory` }}",
62 | "output_directory": "output-{{ user `vm_name` }}-virtualbox-iso",
63 | "shutdown_command": "{{ user `shutdown_command`}}",
64 | "type": "virtualbox-iso",
65 | "vboxmanage": [
66 | ["modifyvm", "{{.Name}}", "--vram", "48"]
67 | ],
68 | "vm_name": "{{ user `vm_name` }}",
69 | "winrm_password": "{{ user `winrm_password` }}",
70 | "winrm_timeout": "10000s",
71 | "winrm_username": "{{ user `winrm_username` }}"
72 | }
73 | ],
74 | "post-processors": [
75 | {
76 | "compression_level": 9,
77 | "keep_input_artifact": false,
78 | "output": "box/{{.Provider}}/{{user `vm_name`}}.box",
79 | "type": "vagrant",
80 | "vagrantfile_template": "vagrantfile-windows.tpl"
81 | }
82 | ],
83 | "provisioners": [
84 | {
85 | "elevated_user": "{{ user `winrm_username` }}",
86 | "elevated_password": "{{ user `winrm_password` }}",
87 | "scripts": [
88 | "script/vmware.ps1",
89 | "script/virtualbox.ps1"
90 | ],
91 | "type": "powershell"
92 | },
93 | {
94 | "type": "windows-restart"
95 | },
96 | {
97 | "type": "powershell",
98 | "inline": ["sleep 60"]
99 | },
100 | {
101 | "type": "windows-restart"
102 | },
103 | {
104 | "type": "powershell",
105 | "inline": ["sleep 60"]
106 | },
107 | {
108 | "type": "windows-restart"
109 | },
110 | {
111 | "type": "powershell",
112 | "inline": ["sleep 60"]
113 | },
114 | {
115 | "elevated_user": "{{ user `winrm_username` }}",
116 | "elevated_password": "{{ user `winrm_password` }}",
117 | "scripts": [
118 | "script/windows_update.ps1"
119 | ],
120 | "type": "powershell"
121 | },
122 | {
123 | "restart_timeout": "1h",
124 | "type": "windows-restart"
125 | },
126 | {
127 | "elevated_user": "{{ user `winrm_username` }}",
128 | "elevated_password": "{{ user `winrm_password` }}",
129 | "scripts": [
130 | "script/windows_update.ps1"
131 | ],
132 | "type": "powershell"
133 | },
134 | {
135 | "restart_timeout": "1h",
136 | "type": "windows-restart"
137 | },
138 | {
139 | "elevated_user": "{{ user `winrm_username` }}",
140 | "elevated_password": "{{ user `winrm_password` }}",
141 | "scripts": [
142 | "script/windows_update.ps1"
143 | ],
144 | "type": "powershell"
145 | },
146 | {
147 | "restart_timeout": "1h",
148 | "type": "windows-restart"
149 | },
150 | {
151 | "elevated_user": "{{ user `winrm_username` }}",
152 | "elevated_password": "{{ user `winrm_password` }}",
153 | "scripts": [
154 | "script/windows_update.ps1"
155 | ],
156 | "type": "powershell"
157 | },
158 | {
159 | "restart_timeout": "1h",
160 | "type": "windows-restart"
161 | },
162 | {
163 | "elevated_user": "{{ user `winrm_username` }}",
164 | "elevated_password": "{{ user `winrm_password` }}",
165 | "scripts": [
166 | "script/windows_update.ps1"
167 | ],
168 | "type": "powershell"
169 | },
170 | {
171 | "restart_timeout": "1h",
172 | "type": "windows-restart"
173 | },
174 | {
175 | "elevated_user": "{{ user `winrm_username` }}",
176 | "elevated_password": "{{ user `winrm_password` }}",
177 | "scripts": [
178 | "script/uninstall_windows_defender.ps1"
179 | ],
180 | "type": "powershell"
181 | },
182 | {
183 | "restart_timeout": "1h",
184 | "type": "windows-restart"
185 | },
186 | {
187 | "elevated_user": "{{ user `winrm_username` }}",
188 | "elevated_password": "{{ user `winrm_password` }}",
189 | "scripts": [
190 | "script/cleanup.ps1"
191 | ],
192 | "type": "powershell"
193 | }
194 | ],
195 | "variables": {
196 | "autounattend": "floppy/eval-win2016/datacenter/autounattend.xml",
197 | "cpus": "2",
198 | "disk_size": "40000",
199 | "guest_os_type": "windows9srv-64",
200 | "iso_checksum": "1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f",
201 | "iso_checksum_type": "sha256",
202 | "iso_name": "Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
203 | "iso_path": "iso",
204 | "iso_url": "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
205 | "memory": "4096",
206 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
207 | "virtual_hw_version": "9",
208 | "vm_name": "eval-win2016-datacenter-sysprep",
209 | "winrm_password": "vagrant",
210 | "winrm_username": "vagrant"
211 | }
212 | }
213 |
214 |
--------------------------------------------------------------------------------
/wsim/eval-win10/install_Windows 10 Enterprise Evaluation.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win10/install_Windows 10 Enterprise Evaluation.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERDATACENTER.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERDATACENTER.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERDATACENTERCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERDATACENTERCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERENTERPRISE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERENTERPRISE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERENTERPRISECORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERENTERPRISECORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERSTANDARD.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERSTANDARD.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERSTANDARDCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERSTANDARDCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERWEB.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERWEB.clg
--------------------------------------------------------------------------------
/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERWEBCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2008r2/install_Windows Server 2008 R2 SERVERWEBCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERDATACENTER.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERDATACENTER.clg
--------------------------------------------------------------------------------
/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERDATACENTERCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERDATACENTERCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERSTANDARD.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERSTANDARD.clg
--------------------------------------------------------------------------------
/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERSTANDARDCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2012r2/install_Windows Server 2012 R2 SERVERSTANDARDCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2016/install_Windows Server 2016 SERVERDATACENTER.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2016/install_Windows Server 2016 SERVERDATACENTER.clg
--------------------------------------------------------------------------------
/wsim/eval-win2016/install_Windows Server 2016 SERVERDATACENTERCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2016/install_Windows Server 2016 SERVERDATACENTERCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2016/install_Windows Server 2016 SERVERSTANDARD.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2016/install_Windows Server 2016 SERVERSTANDARD.clg
--------------------------------------------------------------------------------
/wsim/eval-win2016/install_Windows Server 2016 SERVERSTANDARDCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2016/install_Windows Server 2016 SERVERSTANDARDCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2019/install_Windows Server 2019 SERVERDATACENTER.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2019/install_Windows Server 2019 SERVERDATACENTER.clg
--------------------------------------------------------------------------------
/wsim/eval-win2019/install_Windows Server 2019 SERVERDATACENTERCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2019/install_Windows Server 2019 SERVERDATACENTERCORE.clg
--------------------------------------------------------------------------------
/wsim/eval-win2019/install_Windows Server 2019 SERVERSTANDARD.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2019/install_Windows Server 2019 SERVERSTANDARD.clg
--------------------------------------------------------------------------------
/wsim/eval-win2019/install_Windows Server 2019 SERVERSTANDARDCORE.clg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boxcutter/windows-ps/30367661801ec0cedc6982127c03535056646707/wsim/eval-win2019/install_Windows Server 2019 SERVERSTANDARDCORE.clg
--------------------------------------------------------------------------------