-
Notifications
You must be signed in to change notification settings - Fork 93
/
make answer iso for windows 10.ps1
42 lines (34 loc) · 1.41 KB
/
make answer iso for windows 10.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$osFolder = 'windows-10-amd64'
$isoFolder = 'answer-iso'
if (test-path $isoFolder){
remove-item $isoFolder -Force -Recurse
}
if (test-path windows\$osFolder\answer.iso){
remove-item windows\$osFolder\answer.iso -Force
}
$ENV:UnAttendUseUefi = $true
$ENV:UnAttendUseCdrom = $true
&.\windows\update-variables.ps1
mkdir $isoFolder
copy windows\$osFolder\Autounattend.xml $isoFolder\
copy windows\$osFolder\sysprep-unattend.xml $isoFolder\
copy windows\common\variables.ps1 $isoFolder\
copy windows\common\set-power-config.ps1 $isoFolder\
copy windows\common\microsoft-updates.ps1 $isoFolder\
copy windows\common\win-updates.ps1 $isoFolder\
copy windows\common\run-sysprep.ps1 $isoFolder\
copy windows\common\run-sysprep.cmd $isoFolder\
copy windows\common\oracle-cert.cer $isoFolder\
copy windows\common\enable-winrm.ps1 $isoFolder\
copy windows\common\enable-winrm.task.ps1 $isoFolder\
copy windows\common\fixnetwork.ps1 $isoFolder\
copy windows\common\sdelete.exe $isoFolder\
copy windows\common\sdelete.ps1 $isoFolder\
copy windows\common\elevate.exe $isoFolder\
copy windows\common\Set-ClientWSUSSetting.ps1 $isoFolder\
copy windows\common\Set-ClientWSUSSetting.task.ps1 $isoFolder\
copy windows\common\Reset-ClientWSUSSetting.ps1 $isoFolder\
& .\mkisofs.exe -r -iso-level 4 -UDF -o windows\$osFolder\answer.iso $isoFolder
if (test-path $isoFolder){
remove-item $isoFolder -Force -Recurse
}