This repository has been archived by the owner on Aug 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
make-answer-iso-for-2019.ps1
50 lines (40 loc) · 1.81 KB
/
make-answer-iso-for-2019.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
43
44
45
46
47
48
49
50
$osFolder = 'windows-2019'
$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
}
mkdir $isoFolder
Copy-Item windows\$osFolder\Autounattend.xml $isoFolder\
Copy-Item windows\$osFolder\sysprep-unattend.xml $isoFolder\
Copy-Item windows/windows-2019/Autounattend.xml $isoFolder\
Copy-Item scripts/disable-winrm.ps1 $isoFolder\
Copy-Item scripts/enable-winrm.ps1 $isoFolder\
Copy-Item scripts/disable-screensaver.ps1 $isoFolder\
Copy-Item scripts/win-updates.ps1 $isoFolder\
Copy-Item scripts/microsoft-updates.bat $isoFolder\
Copy-Item scripts/install-chocolatey.ps1 $isoFolder\
Copy-Item scripts/install-psgallerymodules.ps1 $isoFolder\
#Copy-Item windows\scripts\set-power-config.ps1 $isoFolder\
#Copy-Item windows\scripts\microsoft-updates.ps1 $isoFolder\
#Copy-Item windows\scripts\win-updates.ps1 $isoFolder\
Copy-Item scripts\run-sysprep.ps1 $isoFolder\
Copy-Item scripts\run-sysprep.cmd $isoFolder\
#Copy-Item windows\scripts\oracle-cert.cer $isoFolder\
#Copy-Item windows\scripts\enable-winrm.ps1 $isoFolder\
#Copy-Item windows\scripts\enable-winrm.task.ps1 $isoFolder\
#Copy-Item windows\scripts\fixnetwork.ps1 $isoFolder\
Copy-Item scripts\sdelete.exe $isoFolder\
Copy-Item scripts\sdelete.ps1 $isoFolder\
#Copy-Item windows\scripts\elevate.exe $isoFolder\
#Copy-Item windows\scripts\Set-ClientWSUSSetting.ps1 $isoFolder\
#Copy-Item windows\scripts\Set-ClientWSUSSetting.task.ps1 $isoFolder\
#Copy-Item windows\scripts\Reset-ClientWSUSSetting.ps1 $isoFolder\
Copy-Item scripts\enable-rdp.bat $isoFolder\
Copy-Item scripts\pin-powershell.bat $isoFolder\
& .\mkisofs.exe -r -iso-level 4 -UDF -o windows\$osFolder\answer.iso $isoFolder
if (test-path $isoFolder){
remove-item $isoFolder -Force -Recurse
}