├── .gitignore ├── README.md ├── TODO ├── build.sh ├── config.sh ├── isos.sha256 ├── oem ├── ConfigureRemotingForAnsible.ps1 ├── Windows6.1-KB2506143-x64.msu ├── compile-dotnet-assemblies.bat ├── dotNetFx40_Full_x86_x64.exe ├── install-ps3.ps1 ├── install-wmf3-hotfix.ps1 ├── main.ps1 ├── power.ps1 ├── qemu-ga.ps1 ├── sac.ps1 ├── sysprep.bat └── unattend.xml ├── tools ├── click.py ├── import.sh ├── launch.sh ├── metas │ ├── 10e.in │ ├── 11e.in │ ├── 2008.in │ ├── 2012.in │ ├── 2016.in │ ├── 2019.in │ ├── 2022.in │ └── 2025.in ├── mkmeta └── pack.sh ├── unattend ├── 2008 │ └── Autounattend.xml ├── 2012 │ └── Autounattend.xml ├── 2016 │ └── Autounattend.xml ├── 2019 │ └── Autounattend.xml ├── 2022 │ └── Autounattend.xml ├── 2025 │ └── Autounattend.xml ├── 10e-20h2 ├── 10e-21h2 ├── 10e │ └── Autounattend.xml └── 11e │ └── Autounattend.xml └── urls.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /isos/ 2 | /output/ 3 | /tmp/ 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Windows VMs imaging 2 | 3 | An Incus-oriented Windows VMs imaging toolset. 4 | 5 | 6 | ## Features 7 | 8 | - WinRM access (Ansible-ready). 9 | - High-performance power configuration. 10 | - Most/all drivers installed. 11 | - Serial console access (disabled by default). 12 | 13 | 14 | ## Supported versions 15 | 16 | The following Windows versions are supported. 17 | 18 | - Windows 11 Enterprise (24H2) 19 | - Windows 10 Enterprise (20H2, 21H2, 22H2) 20 | - Windows Server 2025 21 | - Windows Server 2022 22 | - Windows Server 2019 23 | - Windows Server 2016 24 | - Windows Server 2012 25 | - Windows Server 2008 R2 SP1 26 | 27 | 28 | ## Requirements 29 | 30 | - curl 31 | - incus 32 | - python 33 | - xorriso 34 | 35 | ``` 36 | apt-get --install-recommends install curl python3 xorriso 37 | 38 | # in case Incus is not installed already 39 | curl -fsSL https://pkgs.zabbly.com/get/incus-stable | sh 40 | incus admin init --auto 41 | ``` 42 | 43 | 44 | ## Usage 45 | 46 | ``` 47 | # Build a disk image (disk.qcow2) and metadata archive (incus.tar.xz) 48 | # in ./output/win2022/ 49 | sh incus-windows/build.sh 2022 50 | 51 | # Import into incus using helper script 52 | sh incus-windows/tools/import.sh ./output/win2022/ 53 | 54 | # Create and launch the virtual machine 55 | incus launch win2022 w22 -c security.secureboot=false 56 | incus launch win2008 w2k8 -c security.secureboot=false -c security.csm=true 57 | ``` 58 | 59 | All systems have an administrator-level account named `admin` with 60 | password `changeme`. 61 | 62 | 63 | ## Customizations 64 | 65 | One can add a directory to add to the boot image and have a script in 66 | it be called automatically during configuration. 67 | 68 | ``` 69 | mkdir local/ 70 | echo "echo hi" >local/main.ps1 71 | sh build.sh 2025 local/ 72 | ``` 73 | 74 | On the image, the directory will be located at `X:\local\`, if `X` is 75 | the drive. 76 | 77 | 78 | ## Considerations 79 | 80 | ### Missing updates 81 | 82 | Configurations are meant to support offline installs. This supports 83 | ensuring that no updates are part of the images. In other words, we're 84 | able to control when, if any, updates/patches will be installed. 85 | 86 | ### Storage space 87 | 88 | Make sure the project's partition has enough storage space. 89 | 90 | - The Windows ISOs and virtio drivers' ISO are automatically downloaded 91 | into the `./isos/` directory. 92 | - The `./tmp/` directory is used to repack the virtio drivers' ISO with 93 | additional installation files. 94 | - The `./output/` directory will contain the VM's disk image, metadata 95 | tarball and unattended install ISO. 96 | 97 | ### Windows Server 2008 R2 SP1 98 | 99 | Windows Server 2008 R2 SP1 is EOL since 2020. However, it still used by 100 | some organizations. For this reason, being able to deploy it in a lab 101 | environment is desired. However, compared to other Windows versions, 102 | automatic configuration is only minimally done/supported. If you'd 103 | like to build a relatively similar image: 104 | 105 | - let Windows install itself using the provided `Autounattend.xml`; 106 | - on the desktop, open `powershell` and run `E:\OEM\install-ps3.ps1` (this can take a while); 107 | - on reboot (automatic), open `powershell` and run `E:\OEM\ConfigureRemotingForAnsible.ps1`; 108 | - run `E:\OEM\power.ps1`; 109 | - run `E:\OEM\qemu-ga.ps1`; 110 | - finally, run `E:\OEM\sysprep.bat E:\OEM\unattend.xml`. 111 | 112 | ### Serial console access 113 | 114 | It is possible to access Windows's serial console interface by 115 | installing the EMS/SAC service. An installation script is provided by 116 | disabled. To install EMS/SAC simply uncomment the instruction in the 117 | `oem/main.ps1` file. Note that installing EMS/SAC on Windows 10 118 | requires network connectivity and that it appears to be broken on 119 | Server 2012. 120 | 121 | ``` 122 | incus console w22 123 | SAC> cmd 124 | SAC> ch -si 1 125 | Username: admin 126 | Domain: 127 | Password: changeme 128 | C:\Windows\System32> 129 | ``` 130 | 131 | 132 | ## Funny stuff 133 | 134 | - Incus supports setting the UEFI's boot priority through a 135 | `device` entry with the `boot.priority` parameter. This means 136 | that we can auto-"boot" to Window's ISO and launch the installer 137 | instead of spamming the Escape key to enter the boot menu. It is 138 | also possible to add ISOs using the `raw.qemu` parameter with a 139 | `-drive` option. The implication of using the former is 140 | that Windows won't mount the drive as a `X:\`-type drive. 141 | 142 | Windows Server 2019 and 2022 will install without issues with the 143 | ISOs attached to the VM in a split setup. However, versions 10, 144 | 2012 and 2016 will only install if both ISOs are attached using 145 | `raw.qemu`. Without that configuration, the Windows installer will 146 | simply error out with an `invalid ` message. 147 | 148 | In other words, with the `device` parameter for booting and the 149 | double `-drive` parameter in `raw.qemu`, Windows 2012, 2016 and 10 150 | will see two (2) drives, but Windows 2019 and 2022 will see three (3). 151 | `Autounattend.xml` files have to be adjusted for this configuration. 152 | haha no, not exactly! Windows 10 sees two (2) devices during 153 | installation and three (3) afterwards. :p 154 | 155 | This is being dealt with automatically by the configuration script; 156 | which detects the setup drive and passes it around. 157 | - EMS/SAC can be installed on the Server 2012 image, but doesn't seem to 158 | work. 159 | 160 | 161 | ## Debugging 162 | 163 | You may connect and interact to the VM during the imaging process by using 164 | the following commands: 165 | 166 | ``` 167 | # identify the vm 168 | #> use the following command or check your console 169 | incus ls build 170 | 171 | # connect to to the vm 172 | incus console --type=vga $vmname 173 | ``` 174 | 175 | Here are some breaking points that you might want to look at: 176 | 177 | - `Autounattend.xml` and scripts refer to drives by letters. As 178 | mentionned in the `Fun facts` section, these tend to change 179 | depending on the setup. Use Shift+F10 to open up a console. 180 | 181 | You may want to use Microsoft's official imaging toolkit to craft 182 | or debug your `Autounattend.xml` file. See the references below 183 | for more information. 184 | 185 | 186 | ## References 187 | 188 | - https://github.com/ruzickap/packer-templates 189 | - https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-server-eos-faq/end-of-support-windows-server-2008-2008r2 190 | - https://github.com/lxc/incus/commit/f14c88de78bf9f2bbe91dd661004ab772ccf179e 191 | - https://bugs.launchpad.net/qemu/+bug/1593605 192 | - https://www.itninja.com/blog/view/validating-unattend-xml-files-with-system-image-manager 193 | - https://vacuumbreather.com/index.php/blog/item/62-the-case-of-just-a-moment 194 | - https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install 195 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - disable hibernation 2 | - install spice-guest-tools 3 | https://www.spice-space.org/download.html#windows-binaries 4 | https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe 5 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ==================================================================== # 3 | # 4 | # This file is part of incus-windows. 5 | # 6 | # Copyright 2025 Philippe Grégoire 7 | # 8 | # ==================================================================== # 9 | set -eu 10 | 11 | PROGNAME=$(basename -- "${0}") 12 | PROGBASE=$(d=$(dirname -- "${0}"); cd "${d}" && pwd) 13 | 14 | usage() { 15 | printf 'usage: %s [-h] target\n' "${PROGNAME}" 16 | } 17 | 18 | while getopts h- argv; do 19 | case "${argv}" in 20 | h) usage 21 | exit 0 22 | ;; 23 | -) break 24 | ;; 25 | *) usage >&2 26 | exit 1 27 | ;; 28 | esac 29 | shift $(( OPTIND - 1 )) 30 | done 31 | 32 | [ X-- != X"${1:-}" ] || shift 33 | 34 | if [ 1 -ne $# ] && [ 2 -ne $# ]; then 35 | usage >&2 36 | targets=$(cut -d' ' -f1 "${PROGBASE}/urls.txt" | paste -sd' ') 37 | printf 'available targets: %s\n' "${targets}" 38 | exit 1 39 | fi 40 | 41 | # -------------------------------------------------------------------- # 42 | 43 | die() { 44 | printf -- "${@}" >&2 45 | exit 1 46 | } 47 | 48 | VERSION="${1}" 49 | 50 | # sanity check on the target 51 | if echo "${VERSION}" | grep -q -- "^[a-z0-9-]$"; then 52 | printf 'error: invalid target name\n' >&2 53 | exit 1 54 | fi 55 | 56 | # verify the target 57 | url=$(awk "/^${VERSION} /{print \$2;}" "${PROGBASE}/urls.txt") 58 | [ X != X"${url}" ] || die 'error: unable to locate URL for target: %s\n' "${VERSION}" 59 | 60 | fname=$(basename "${url}") 61 | sha=$(awk "/ ${fname}$/{print \$1;}" "${PROGBASE}/isos.sha256") 62 | [ X != X"${sha}" ] || die 'error: unable to locate SHA-256 digest for %s\n' "${fname}" 63 | 64 | # -------------------------------------------------------------------- # 65 | 66 | ISODIR="${ISODIR:-./isos}" 67 | OUTDIR="${OUTDIR:-./output/win${VERSION}}" 68 | 69 | 70 | # dliso url fname sha256 71 | dliso() { 72 | [ -d "${ISODIR}" ] || mkdir "${ISODIR}" 73 | 74 | [ -f "${ISODIR}/${2}" ] || curl -fSLo "${ISODIR}/${2}" "${1}" 75 | 76 | if [ X"${3}" != X$(sha256sum "${ISODIR}/${2}" | cut -d' ' -f1) ]; then 77 | die 'error: hash mismatch for %s\n' "${ISODIR}/${2}" 78 | fi 79 | } 80 | 81 | 82 | # source in the virtio references 83 | . "${PROGBASE}/config.sh" 84 | 85 | 86 | printf '[+] Downloading virtio drivers for Windows\n' 87 | 88 | dliso "${VIRTIO_ARCHIVE}/virtio-win-${VIRTIO_VERSION}/virtio-win.iso" "virtio-win-${VIRTIO_VERSION}.iso" "${VIRTIO_SHA256}" 89 | 90 | 91 | printf '[+] Downloading Windows ISO file\n' 92 | 93 | dliso "${url}" "${fname}" "${sha}" 94 | 95 | 96 | printf '[+] Building image\n' 97 | 98 | [ ! -d "${OUTDIR}" ] || die 'error: %s already exists\n' "${OUTDIR}" 99 | mkdir -p "${OUTDIR}" 100 | 101 | shift 102 | sh "${PROGBASE}/tools/pack.sh" \ 103 | "${VERSION}" \ 104 | "${ISODIR}/${fname}" \ 105 | "${ISODIR}/virtio-win-${VIRTIO_VERSION}.iso" \ 106 | "${PROGBASE}/oem/" \ 107 | "${OUTDIR}" \ 108 | "${@}" 109 | 110 | 111 | printf '[+] Generating metadata\n' 112 | 113 | exec sh "${PROGBASE}/tools/mkmeta" "${VERSION}" >"${OUTDIR}/incus.tar.xz" 114 | 115 | # ==================================================================== # 116 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | VIRTIO_ARCHIVE="${VIRTIO_ARCHIVE:-https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/}" 2 | # 0.1.262-1 breaks 2012 3 | VIRTIO_VERSION="${VIRTIO_VERSION:-0.1.248-1}" 4 | VIRTIO_SHA256="${VIRTIO_SHA256:-d5b5739cf297f0538d263e30678d5a09bba470a7c6bcbd8dff74e44153f16549}" 5 | -------------------------------------------------------------------------------- /isos.sha256: -------------------------------------------------------------------------------- 1 | 755a90d43e826a74b9e1932a34788b898e028272439b777e5593dee8d53622ae 26100.1742.240906-0331.ge_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 2 | 549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1 17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso 3 | 32c7b0a51a48cc4f67c250be4fe2b384febb9cc864c5b77a052d4e2845394eac 19042.631.201119-0144.20h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 4 | 69efac1df9ec8066341d8c9b62297ddece0e6b805533fdb6dd66bc8034fba27a 19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 5 | ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668 19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 6 | 4f1457c4fe14ce48c9b2324924f33ca4f0470475e6da851b39ccbf98f44e7852 20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso 7 | 6612b5b1f53e845aacdf96e974bb119a3d9b4dcb5b82e65804ab7e534dc7b4d5 9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO 8 | dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8 en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso 9 | 1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO 10 | 16442d1c0509bcbb25b715b1b322a15fb3ab724a42da0f384b9406ca1c124ed4 26100.1.240331-1435.ge_release_SERVER_EVAL_x64FRE_en-us.iso 11 | -------------------------------------------------------------------------------- /oem/ConfigureRemotingForAnsible.ps1: -------------------------------------------------------------------------------- 1 | #Requires -Version 3.0 2 | 3 | # Configure a Windows host for remote management with Ansible 4 | # ----------------------------------------------------------- 5 | # 6 | # This script checks the current WinRM (PS Remoting) configuration and makes 7 | # the necessary changes to allow Ansible to connect, authenticate and 8 | # execute PowerShell commands. 9 | # 10 | # All events are logged to the Windows EventLog, useful for unattended runs. 11 | # 12 | # Use option -Verbose in order to see the verbose output messages. 13 | # 14 | # Use option -CertValidityDays to specify how long this certificate is valid 15 | # starting from today. So you would specify -CertValidityDays 3650 to get 16 | # a 10-year valid certificate. 17 | # 18 | # Use option -ForceNewSSLCert if the system has been SysPreped and a new 19 | # SSL Certificate must be forced on the WinRM Listener when re-running this 20 | # script. This is necessary when a new SID and CN name is created. 21 | # 22 | # Use option -EnableCredSSP to enable CredSSP as an authentication option. 23 | # 24 | # Use option -DisableBasicAuth to disable basic authentication. 25 | # 26 | # Use option -SkipNetworkProfileCheck to skip the network profile check. 27 | # Without specifying this the script will only run if the device's interfaces 28 | # are in DOMAIN or PRIVATE zones. Provide this switch if you want to enable 29 | # WinRM on a device with an interface in PUBLIC zone. 30 | # 31 | # Use option -SubjectName to specify the CN name of the certificate. This 32 | # defaults to the system's hostname and generally should not be specified. 33 | 34 | # Written by Trond Hindenes 35 | # Updated by Chris Church 36 | # Updated by Michael Crilly 37 | # Updated by Anton Ouzounov 38 | # Updated by Nicolas Simond 39 | # Updated by Dag Wieërs 40 | # Updated by Jordan Borean 41 | # Updated by Erwan Quélin 42 | # Updated by David Norman 43 | # 44 | # Version 1.0 - 2014-07-06 45 | # Version 1.1 - 2014-11-11 46 | # Version 1.2 - 2015-05-15 47 | # Version 1.3 - 2016-04-04 48 | # Version 1.4 - 2017-01-05 49 | # Version 1.5 - 2017-02-09 50 | # Version 1.6 - 2017-04-18 51 | # Version 1.7 - 2017-11-23 52 | # Version 1.8 - 2018-02-23 53 | # Version 1.9 - 2018-09-21 54 | 55 | # Support -Verbose option 56 | [CmdletBinding()] 57 | 58 | Param ( 59 | [string]$SubjectName = $env:COMPUTERNAME, 60 | [int]$CertValidityDays = 1095, 61 | [switch]$SkipNetworkProfileCheck, 62 | $CreateSelfSignedCert = $true, 63 | [switch]$ForceNewSSLCert, 64 | [switch]$GlobalHttpFirewallAccess, 65 | [switch]$DisableBasicAuth = $false, 66 | [switch]$EnableCredSSP 67 | ) 68 | 69 | Function Write-Log 70 | { 71 | $Message = $args[0] 72 | Write-EventLog -LogName Application -Source $EventSource -EntryType Information -EventId 1 -Message $Message 73 | } 74 | 75 | Function Write-VerboseLog 76 | { 77 | $Message = $args[0] 78 | Write-Verbose $Message 79 | Write-Log $Message 80 | } 81 | 82 | Function Write-HostLog 83 | { 84 | $Message = $args[0] 85 | Write-Output $Message 86 | Write-Log $Message 87 | } 88 | 89 | Function New-LegacySelfSignedCert 90 | { 91 | Param ( 92 | [string]$SubjectName, 93 | [int]$ValidDays = 1095 94 | ) 95 | 96 | $hostnonFQDN = $env:computerName 97 | $hostFQDN = [System.Net.Dns]::GetHostByName(($env:computerName)).Hostname 98 | $SignatureAlgorithm = "SHA256" 99 | 100 | $name = New-Object -COM "X509Enrollment.CX500DistinguishedName.1" 101 | $name.Encode("CN=$SubjectName", 0) 102 | 103 | $key = New-Object -COM "X509Enrollment.CX509PrivateKey.1" 104 | $key.ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider" 105 | $key.KeySpec = 1 106 | $key.Length = 4096 107 | $key.SecurityDescriptor = "D:PAI(A;;0xd01f01ff;;;SY)(A;;0xd01f01ff;;;BA)(A;;0x80120089;;;NS)" 108 | $key.MachineContext = 1 109 | $key.Create() 110 | 111 | $serverauthoid = New-Object -COM "X509Enrollment.CObjectId.1" 112 | $serverauthoid.InitializeFromValue("1.3.6.1.5.5.7.3.1") 113 | $ekuoids = New-Object -COM "X509Enrollment.CObjectIds.1" 114 | $ekuoids.Add($serverauthoid) 115 | $ekuext = New-Object -COM "X509Enrollment.CX509ExtensionEnhancedKeyUsage.1" 116 | $ekuext.InitializeEncode($ekuoids) 117 | 118 | $cert = New-Object -COM "X509Enrollment.CX509CertificateRequestCertificate.1" 119 | $cert.InitializeFromPrivateKey(2, $key, "") 120 | $cert.Subject = $name 121 | $cert.Issuer = $cert.Subject 122 | $cert.NotBefore = (Get-Date).AddDays(-1) 123 | $cert.NotAfter = $cert.NotBefore.AddDays($ValidDays) 124 | 125 | $SigOID = New-Object -ComObject X509Enrollment.CObjectId 126 | $SigOID.InitializeFromValue(([Security.Cryptography.Oid]$SignatureAlgorithm).Value) 127 | 128 | [string[]] $AlternativeName += $hostnonFQDN 129 | $AlternativeName += $hostFQDN 130 | $IAlternativeNames = New-Object -ComObject X509Enrollment.CAlternativeNames 131 | 132 | foreach ($AN in $AlternativeName) 133 | { 134 | $AltName = New-Object -ComObject X509Enrollment.CAlternativeName 135 | $AltName.InitializeFromString(0x3,$AN) 136 | $IAlternativeNames.Add($AltName) 137 | } 138 | 139 | $SubjectAlternativeName = New-Object -ComObject X509Enrollment.CX509ExtensionAlternativeNames 140 | $SubjectAlternativeName.InitializeEncode($IAlternativeNames) 141 | 142 | [String[]]$KeyUsage = ("DigitalSignature", "KeyEncipherment") 143 | $KeyUsageObj = New-Object -ComObject X509Enrollment.CX509ExtensionKeyUsage 144 | $KeyUsageObj.InitializeEncode([int][Security.Cryptography.X509Certificates.X509KeyUsageFlags]($KeyUsage)) 145 | $KeyUsageObj.Critical = $true 146 | 147 | $cert.X509Extensions.Add($KeyUsageObj) 148 | $cert.X509Extensions.Add($ekuext) 149 | $cert.SignatureInformation.HashAlgorithm = $SigOID 150 | $CERT.X509Extensions.Add($SubjectAlternativeName) 151 | $cert.Encode() 152 | 153 | $enrollment = New-Object -COM "X509Enrollment.CX509Enrollment.1" 154 | $enrollment.InitializeFromRequest($cert) 155 | $certdata = $enrollment.CreateRequest(0) 156 | $enrollment.InstallResponse(2, $certdata, 0, "") 157 | 158 | # extract/return the thumbprint from the generated cert 159 | $parsed_cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 160 | $parsed_cert.Import([System.Text.Encoding]::UTF8.GetBytes($certdata)) 161 | 162 | return $parsed_cert.Thumbprint 163 | } 164 | 165 | Function Enable-GlobalHttpFirewallAccess 166 | { 167 | Write-Verbose "Forcing global HTTP firewall access" 168 | # this is a fairly naive implementation; could be more sophisticated about rule matching/collapsing 169 | $fw = New-Object -ComObject HNetCfg.FWPolicy2 170 | 171 | # try to find/enable the default rule first 172 | $add_rule = $false 173 | $matching_rules = $fw.Rules | Where-Object { $_.Name -eq "Windows Remote Management (HTTP-In)" } 174 | $rule = $null 175 | If ($matching_rules) { 176 | If ($matching_rules -isnot [Array]) { 177 | Write-Verbose "Editing existing single HTTP firewall rule" 178 | $rule = $matching_rules 179 | } 180 | Else { 181 | # try to find one with the All or Public profile first 182 | Write-Verbose "Found multiple existing HTTP firewall rules..." 183 | $rule = $matching_rules | ForEach-Object { $_.Profiles -band 4 }[0] 184 | 185 | If (-not $rule -or $rule -is [Array]) { 186 | Write-Verbose "Editing an arbitrary single HTTP firewall rule (multiple existed)" 187 | # oh well, just pick the first one 188 | $rule = $matching_rules[0] 189 | } 190 | } 191 | } 192 | 193 | If (-not $rule) { 194 | Write-Verbose "Creating a new HTTP firewall rule" 195 | $rule = New-Object -ComObject HNetCfg.FWRule 196 | $rule.Name = "Windows Remote Management (HTTP-In)" 197 | $rule.Description = "Inbound rule for Windows Remote Management via WS-Management. [TCP 5985]" 198 | $add_rule = $true 199 | } 200 | 201 | $rule.Profiles = 0x7FFFFFFF 202 | $rule.Protocol = 6 203 | $rule.LocalPorts = 5985 204 | $rule.RemotePorts = "*" 205 | $rule.LocalAddresses = "*" 206 | $rule.RemoteAddresses = "*" 207 | $rule.Enabled = $true 208 | $rule.Direction = 1 209 | $rule.Action = 1 210 | $rule.Grouping = "Windows Remote Management" 211 | 212 | If ($add_rule) { 213 | $fw.Rules.Add($rule) 214 | } 215 | 216 | Write-Verbose "HTTP firewall rule $($rule.Name) updated" 217 | } 218 | 219 | # Setup error handling. 220 | Trap 221 | { 222 | $_ 223 | Exit 1 224 | } 225 | $ErrorActionPreference = "Stop" 226 | 227 | # Get the ID and security principal of the current user account 228 | $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() 229 | $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) 230 | 231 | # Get the security principal for the Administrator role 232 | $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator 233 | 234 | # Check to see if we are currently running "as Administrator" 235 | if (-Not $myWindowsPrincipal.IsInRole($adminRole)) 236 | { 237 | Write-Output "ERROR: You need elevated Administrator privileges in order to run this script." 238 | Write-Output " Start Windows PowerShell by using the Run as Administrator option." 239 | Exit 2 240 | } 241 | 242 | $EventSource = $MyInvocation.MyCommand.Name 243 | If (-Not $EventSource) 244 | { 245 | $EventSource = "Powershell CLI" 246 | } 247 | 248 | If ([System.Diagnostics.EventLog]::Exists('Application') -eq $False -or [System.Diagnostics.EventLog]::SourceExists($EventSource) -eq $False) 249 | { 250 | New-EventLog -LogName Application -Source $EventSource 251 | } 252 | 253 | # Detect PowerShell version. 254 | If ($PSVersionTable.PSVersion.Major -lt 3) 255 | { 256 | Write-Log "PowerShell version 3 or higher is required." 257 | Throw "PowerShell version 3 or higher is required." 258 | } 259 | 260 | # Find and start the WinRM service. 261 | Write-Verbose "Verifying WinRM service." 262 | If (!(Get-Service "WinRM")) 263 | { 264 | Write-Log "Unable to find the WinRM service." 265 | Throw "Unable to find the WinRM service." 266 | } 267 | ElseIf ((Get-Service "WinRM").Status -ne "Running") 268 | { 269 | Write-Verbose "Setting WinRM service to start automatically on boot." 270 | Set-Service -Name "WinRM" -StartupType Automatic 271 | Write-Log "Set WinRM service to start automatically on boot." 272 | Write-Verbose "Starting WinRM service." 273 | Start-Service -Name "WinRM" -ErrorAction Stop 274 | Write-Log "Started WinRM service." 275 | 276 | } 277 | 278 | # WinRM should be running; check that we have a PS session config. 279 | If (!(Get-PSSessionConfiguration -Verbose:$false) -or (!(Get-ChildItem WSMan:\localhost\Listener))) 280 | { 281 | If ($SkipNetworkProfileCheck) { 282 | Write-Verbose "Enabling PS Remoting without checking Network profile." 283 | Enable-PSRemoting -SkipNetworkProfileCheck -Force -ErrorAction Stop 284 | Write-Log "Enabled PS Remoting without checking Network profile." 285 | } 286 | Else { 287 | Write-Verbose "Enabling PS Remoting." 288 | Enable-PSRemoting -Force -ErrorAction Stop 289 | Write-Log "Enabled PS Remoting." 290 | } 291 | } 292 | Else 293 | { 294 | Write-Verbose "PS Remoting is already enabled." 295 | } 296 | 297 | # Ensure LocalAccountTokenFilterPolicy is set to 1 298 | # https://github.com/ansible/ansible/issues/42978 299 | $token_path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" 300 | $token_prop_name = "LocalAccountTokenFilterPolicy" 301 | $token_key = Get-Item -Path $token_path 302 | $token_value = $token_key.GetValue($token_prop_name, $null) 303 | if ($token_value -ne 1) { 304 | Write-Verbose "Setting LocalAccountTOkenFilterPolicy to 1" 305 | if ($null -ne $token_value) { 306 | Remove-ItemProperty -Path $token_path -Name $token_prop_name 307 | } 308 | New-ItemProperty -Path $token_path -Name $token_prop_name -Value 1 -PropertyType DWORD > $null 309 | } 310 | 311 | # Make sure there is a SSL listener. 312 | $listeners = Get-ChildItem WSMan:\localhost\Listener 313 | If (!($listeners | Where-Object {$_.Keys -like "TRANSPORT=HTTPS"})) 314 | { 315 | # We cannot use New-SelfSignedCertificate on 2012R2 and earlier 316 | $thumbprint = New-LegacySelfSignedCert -SubjectName $SubjectName -ValidDays $CertValidityDays 317 | Write-HostLog "Self-signed SSL certificate generated; thumbprint: $thumbprint" 318 | 319 | # Create the hashtables of settings to be used. 320 | $valueset = @{ 321 | Hostname = $SubjectName 322 | CertificateThumbprint = $thumbprint 323 | } 324 | 325 | $selectorset = @{ 326 | Transport = "HTTPS" 327 | Address = "*" 328 | } 329 | 330 | Write-Verbose "Enabling SSL listener." 331 | New-WSManInstance -ResourceURI 'winrm/config/Listener' -SelectorSet $selectorset -ValueSet $valueset 332 | Write-Log "Enabled SSL listener." 333 | } 334 | Else 335 | { 336 | Write-Verbose "SSL listener is already active." 337 | 338 | # Force a new SSL cert on Listener if the $ForceNewSSLCert 339 | If ($ForceNewSSLCert) 340 | { 341 | 342 | # We cannot use New-SelfSignedCertificate on 2012R2 and earlier 343 | $thumbprint = New-LegacySelfSignedCert -SubjectName $SubjectName -ValidDays $CertValidityDays 344 | Write-HostLog "Self-signed SSL certificate generated; thumbprint: $thumbprint" 345 | 346 | $valueset = @{ 347 | CertificateThumbprint = $thumbprint 348 | Hostname = $SubjectName 349 | } 350 | 351 | # Delete the listener for SSL 352 | $selectorset = @{ 353 | Address = "*" 354 | Transport = "HTTPS" 355 | } 356 | Remove-WSManInstance -ResourceURI 'winrm/config/Listener' -SelectorSet $selectorset 357 | 358 | # Add new Listener with new SSL cert 359 | New-WSManInstance -ResourceURI 'winrm/config/Listener' -SelectorSet $selectorset -ValueSet $valueset 360 | } 361 | } 362 | 363 | # Check for basic authentication. 364 | $basicAuthSetting = Get-ChildItem WSMan:\localhost\Service\Auth | Where-Object {$_.Name -eq "Basic"} 365 | 366 | If ($DisableBasicAuth) 367 | { 368 | If (($basicAuthSetting.Value) -eq $true) 369 | { 370 | Write-Verbose "Disabling basic auth support." 371 | Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $false 372 | Write-Log "Disabled basic auth support." 373 | } 374 | Else 375 | { 376 | Write-Verbose "Basic auth is already disabled." 377 | } 378 | } 379 | Else 380 | { 381 | If (($basicAuthSetting.Value) -eq $false) 382 | { 383 | Write-Verbose "Enabling basic auth support." 384 | Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $true 385 | Write-Log "Enabled basic auth support." 386 | } 387 | Else 388 | { 389 | Write-Verbose "Basic auth is already enabled." 390 | } 391 | } 392 | 393 | # If EnableCredSSP if set to true 394 | If ($EnableCredSSP) 395 | { 396 | # Check for CredSSP authentication 397 | $credsspAuthSetting = Get-ChildItem WSMan:\localhost\Service\Auth | Where-Object {$_.Name -eq "CredSSP"} 398 | If (($credsspAuthSetting.Value) -eq $false) 399 | { 400 | Write-Verbose "Enabling CredSSP auth support." 401 | Enable-WSManCredSSP -role server -Force 402 | Write-Log "Enabled CredSSP auth support." 403 | } 404 | } 405 | 406 | If ($GlobalHttpFirewallAccess) { 407 | Enable-GlobalHttpFirewallAccess 408 | } 409 | 410 | # Configure firewall to allow WinRM HTTPS connections. 411 | $fwtest1 = netsh advfirewall firewall show rule name="Allow WinRM HTTPS" 412 | $fwtest2 = netsh advfirewall firewall show rule name="Allow WinRM HTTPS" profile=any 413 | If ($fwtest1.count -lt 5) 414 | { 415 | Write-Verbose "Adding firewall rule to allow WinRM HTTPS." 416 | netsh advfirewall firewall add rule profile=any name="Allow WinRM HTTPS" dir=in localport=5986 protocol=TCP action=allow 417 | Write-Log "Added firewall rule to allow WinRM HTTPS." 418 | } 419 | ElseIf (($fwtest1.count -ge 5) -and ($fwtest2.count -lt 5)) 420 | { 421 | Write-Verbose "Updating firewall rule to allow WinRM HTTPS for any profile." 422 | netsh advfirewall firewall set rule name="Allow WinRM HTTPS" new profile=any 423 | Write-Log "Updated firewall rule to allow WinRM HTTPS for any profile." 424 | } 425 | Else 426 | { 427 | Write-Verbose "Firewall rule already exists to allow WinRM HTTPS." 428 | } 429 | 430 | # Test a remoting connection to localhost, which should work. 431 | $httpResult = Invoke-Command -ComputerName "localhost" -ScriptBlock {$env:COMPUTERNAME} -ErrorVariable httpError -ErrorAction SilentlyContinue 432 | $httpsOptions = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck 433 | 434 | $httpsResult = New-PSSession -UseSSL -ComputerName "localhost" -SessionOption $httpsOptions -ErrorVariable httpsError -ErrorAction SilentlyContinue 435 | 436 | If ($httpResult -and $httpsResult) 437 | { 438 | Write-Verbose "HTTP: Enabled | HTTPS: Enabled" 439 | } 440 | ElseIf ($httpsResult -and !$httpResult) 441 | { 442 | Write-Verbose "HTTP: Disabled | HTTPS: Enabled" 443 | } 444 | ElseIf ($httpResult -and !$httpsResult) 445 | { 446 | Write-Verbose "HTTP: Enabled | HTTPS: Disabled" 447 | } 448 | Else 449 | { 450 | Write-Log "Unable to establish an HTTP or HTTPS remoting session." 451 | Throw "Unable to establish an HTTP or HTTPS remoting session." 452 | } 453 | Write-VerboseLog "PS Remoting has been successfully configured for Ansible." 454 | -------------------------------------------------------------------------------- /oem/Windows6.1-KB2506143-x64.msu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antifob/incus-windows/bdb80b9e8cf6e8cc8e80e3104a40fe51ec75ae1e/oem/Windows6.1-KB2506143-x64.msu -------------------------------------------------------------------------------- /oem/compile-dotnet-assemblies.bat: -------------------------------------------------------------------------------- 1 | ::http://support.microsoft.com/kb/2570538 2 | ::http://robrelyea.wordpress.com/2007/07/13/may-be-helpful-ngen-exe-executequeueditems/ 3 | 4 | %windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue > NUL 5 | %windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems > NUL 6 | 7 | if "%PROCESSOR_ARCHITECTURE%"!="AMD64" goto 64BIT 8 | 9 | %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue > NUL 10 | %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems > NUL 11 | 12 | :32BIT 13 | exit 0 14 | -------------------------------------------------------------------------------- /oem/dotNetFx40_Full_x86_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antifob/incus-windows/bdb80b9e8cf6e8cc8e80e3104a40fe51ec75ae1e/oem/dotNetFx40_Full_x86_x64.exe -------------------------------------------------------------------------------- /oem/install-ps3.ps1: -------------------------------------------------------------------------------- 1 | # 2 | # https://stackoverflow.com/questions/8533860/net-framework-4-installation-in-silent-mode 3 | # https://social.technet.microsoft.com/Forums/WINDOWS/en-US/f6763d33-ad34-4167-8879-ebdab96eb792/install-windows-management-framework-3-powershell-remotely-to-2008-r2?forum=winserverManagement 4 | # 5 | 6 | get-wmiobject win32_logicaldisk | % { 7 | if ($_.volumename -like 'STUFF*') { 8 | start-process ($_.deviceid+'/OEM/dotNetFx40_Full_x86_x64.exe') -wait -argumentlist '/q /norestart' 9 | start-process wusa.exe -wait -argumentlist ($_.deviceid+'/OEM/Windows6.1-KB2506143-x64.msu /quiet') 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /oem/install-wmf3-hotfix.ps1: -------------------------------------------------------------------------------- 1 | #Requires -Version 3.0 2 | <#PSScriptInfo 3 | .VERSION 1.0 4 | .GUID 6cf319d1-8c50-460b-99ee-71b11cf7270d 5 | .AUTHOR 6 | Jordan Borean 7 | .COPYRIGHT 8 | Jordan Borean 2017 9 | .TAGS 10 | PowerShell,Ansible,WinRM,WMF,Hotfix 11 | .LICENSEURI https://github.com/jborean93/ansible-windows/blob/master/LICENSE 12 | .PROJECTURI https://github.com/jborean93/ansible-windows 13 | .RELEASENOTES 14 | Version 1.0: 2017-09-27 15 | Initial script created 16 | #> 17 | 18 | <# 19 | .DESCRIPTION 20 | The script will install the WinRM hotfix KB2842230 which fixes the memory 21 | issues that occur when running over WinRM with WMF 3.0. 22 | The script will; 23 | 1. Detect if running on PS version 3.0 and exit if it is not 24 | 2. Check if KB2842230 is already installed and exit if it is 25 | 3. Download the hotfix from Microsoft server's based on the OS version 26 | 4. Extract the .msu file from the downloaded hotfix 27 | 5. Install the .msu silently 28 | 6. Detect if a reboot is required and prompt whether the user wants to restart 29 | 30 | Once the install is complete, if the install process returns an exit 31 | code of 3010, it will ask the user whether to restart the computer now 32 | or whether it will be done later. 33 | 34 | See https://github.com/jborean93/ansible-windows/tree/master/scripts for more 35 | details. 36 | .PARAMETER Verbose 37 | [switch] - Whether to display Verbose logs on the console 38 | .EXAMPLE 39 | powershell.exe -ExecutionPolicy ByPass -File Install-WMF3Hotfix.ps1 40 | .EXAMPLE 41 | powershell.exe -ExecutionPolicy ByPass -File Install-WMF3Hotfix.ps1 -Verbose 42 | #> 43 | 44 | [CmdletBinding()] 45 | Param() 46 | 47 | $ErrorActionPreference = "Stop" 48 | if ($verbose) { 49 | $VerbosePreference = "Continue" 50 | } 51 | 52 | Function Run-Process($executable, $arguments) { 53 | $process = New-Object -TypeName System.Diagnostics.Process 54 | $psi = $process.StartInfo 55 | $psi.FileName = $executable 56 | $psi.Arguments = $arguments 57 | Write-Verbose -Message "starting new process '$executable $arguments'" 58 | $process.Start() | Out-Null 59 | 60 | $process.WaitForExit() | Out-Null 61 | $exit_code = $process.ExitCode 62 | Write-Verbose -Message "process completed with exit code '$exit_code'" 63 | 64 | return $exit_code 65 | } 66 | 67 | Function Download-File($url, $path) { 68 | Write-Verbose -Message "downloading url '$url' to '$path'" 69 | $client = New-Object -TypeName System.Net.WebClient 70 | $client.DownloadFile($url, $path) 71 | } 72 | 73 | Function Extract-Zip($zip, $dest) { 74 | Write-Verbose -Message "extracting '$zip' to '$dest'" 75 | try { 76 | Add-Type -AssemblyName System.IO.Compression.FileSystem > $null 77 | $legacy = $false 78 | } catch { 79 | $legacy = $true 80 | } 81 | 82 | if ($legacy) { 83 | $shell = New-Object -ComObject Shell.Application 84 | $zip_src = $shell.NameSpace($zip) 85 | $zip_dest = $shell.NameSpace($dest) 86 | $zip_dest.CopyHere($zip_src.Items(), 1044) 87 | } else { 88 | [System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $dest) 89 | } 90 | } 91 | 92 | $tmp_dir = $env:temp 93 | $kb = "KB2842230" 94 | if ($PSVersionTable.PSVersion.Major -ne 3) { 95 | Write-Verbose -Message "$kb is only applicable with Powershell v3, no action required" 96 | exit 0 97 | } 98 | 99 | $hotfix_installed = Get-Hotfix -Id $kb -ErrorAction SilentlyContinue 100 | if ($hotfix_installed -ne $null) { 101 | Write-Verbose -Message "$kb is already installed" 102 | exit 0 103 | } 104 | 105 | if (-not (Test-Path -Path $tmp_dir)) { 106 | New-Item -Path $tmp_dir -ItemType Directory > $null 107 | } 108 | $os_version = [Version](Get-Item -Path "$env:SystemRoot\System32\kernel32.dll").VersionInfo.ProductVersion 109 | $host_string = "$($os_version.Major).$($os_version.Minor)-$($env:PROCESSOR_ARCHITECTURE)" 110 | switch($host_string) { 111 | # These URLS point to the Ansible Core CI S3 bucket, MS no longer provide a link to Server 2008 so we need to 112 | # rely on this URL. There are no guarantees this will stay up in the future. 113 | "6.0-x86" { 114 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/464091_intl_i386_zip.exe" 115 | } 116 | "6.0-AMD64" { 117 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/464090_intl_x64_zip.exe" 118 | } 119 | "6.1-x86" { 120 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/463983_intl_i386_zip.exe" 121 | } 122 | "6.1-AMD64" { 123 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/463984_intl_x64_zip.exe" 124 | } 125 | "6.2-x86" { 126 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/463940_intl_i386_zip.exe" 127 | } 128 | "6.2-AMD64" { 129 | $url = "https://s3.amazonaws.com/ansible-ci-files/hotfixes/KB2842230/463941_intl_x64_zip.exe" 130 | } 131 | } 132 | 133 | $filename = $url.Split("/")[-1] 134 | $compressed_file = "$tmp_dir\$($filename).zip" 135 | Download-File -url $url -path $compressed_file 136 | Extract-Zip -zip $compressed_file -dest $tmp_dir 137 | $file = Get-Item -Path "$tmp_dir\*$kb*.msu" 138 | if ($file -eq $null) { 139 | Write-Error -Message "unable to find extracted msu file for hotfix KB" 140 | exit 1 141 | } 142 | 143 | $exit_code = Run-Process -executable $file.FullName -arguments "/quiet /norestart" 144 | if ($exit_code -eq 3010) { 145 | Write-Verbose "need to restart computer after hotfix $kb install" 146 | Restart-Computer -Confirm 147 | } elseif ($exit_code -ne 0) { 148 | Write-Error -Message "failed to install hotfix $($kb): exit code $exit_code" 149 | } else { 150 | Write-Verbose -Message "hotfix $kb install complete" 151 | } 152 | exit $exit_code 153 | -------------------------------------------------------------------------------- /oem/main.ps1: -------------------------------------------------------------------------------- 1 | get-wmiobject win32_logicaldisk | % { 2 | if ($_.volumename -like 'STUFF*') { 3 | $setupdrive = $_.deviceid 4 | } 5 | } 6 | 7 | cmd.exe /c "${setupdrive}\OEM\compile-dotnet-assemblies.bat" 8 | reg.exe add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff" 9 | 10 | . "${setupdrive}\OEM\power.ps1" 11 | . "${setupdrive}\OEM\qemu-ga.ps1" 12 | # . "${setupdrive}\OEM\sac.ps1" 13 | . "${setupdrive}\OEM\ConfigureRemotingForAnsible.ps1" 14 | 15 | if (test-path "${setupdrive}\local\main.ps1") { 16 | . "${setupdrive}\local\main.ps1" 17 | } 18 | 19 | cmd.exe /c "${setupdrive}\OEM\sysprep.bat" "${setupdrive}\OEM\unattend.xml" 20 | -------------------------------------------------------------------------------- /oem/power.ps1: -------------------------------------------------------------------------------- 1 | powercfg -setactive scheme_min 2 | cmd /c "%systemroot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f" 3 | cmd /c "%systemroot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f" 4 | -------------------------------------------------------------------------------- /oem/qemu-ga.ps1: -------------------------------------------------------------------------------- 1 | # 2 | # get-volume is only available from ps 4.0 3 | # https://stackoverflow.com/questions/26168371/powershell-3-0-alternative-to-get-volume 4 | # 5 | #Start-Process msiexec.exe -Wait -ArgumentList ('/I '+((get-volume | ? filesystemlabel -like STUFF*).DriveLetter)+':\guest-agent\qemu-ga-x86_64.msi /quiet') 6 | #Start-Process msiexec.exe -Wait -ArgumentList ('/I '+((get-volume | ? filesystemlabel -like STUFF*).DriveLetter)+':\virtio-win-gt-x64.msi /quiet') 7 | 8 | get-wmiobject win32_logicaldisk | % { 9 | if ($_.volumename -like 'STUFF*') { 10 | Start-Process msiexec.exe -Wait -ArgumentList ('/I '+$_.deviceid+'\guest-agent\qemu-ga-x86_64.msi /quiet') 11 | Start-Process msiexec.exe -Wait -ArgumentList ('/I '+$_.deviceid+'\virtio-win-gt-x64.msi /quiet') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /oem/sac.ps1: -------------------------------------------------------------------------------- 1 | # https://jdhitsolutions.com/blog/powershell-7/7969/deploy-openssh-server-to-windows-10/ 2 | 3 | if (get-windowscapability -online -name windows.desktop.ems-sac.tools* | ? state -like notpresent*) { 4 | $t = new-scheduledtasktrigger -At 23:59 -Once 5 | $u = New-scheduledtaskprincipal System 6 | $a = new-scheduledtaskaction -execute "powershell" -argument '-noprofile -command "& { Get-WindowsCapability -online -name windows.desktop.ems-sac.tools* | Add-WindowsCapability -online}"' 7 | $k = register-scheduledtask -taskpath \ -taskname "AddTask" -trigger $t -principal $u -action $a 8 | start-scheduledtask -taskname AddTask 9 | 10 | while (get-windowscapability -online -name windows.desktop.ems-sac.tools* | ? state -like notpresent*) { 11 | start-sleep -seconds 120 12 | } 13 | 14 | $k | unregister-scheduledtask -confirm:$false 15 | } 16 | 17 | cmd /c "%systemroot%\system32\bcdedit /ems on" 18 | cmd /c "%systemroot%\system32\bcdedit /bootems on" 19 | cmd /c "%systemroot%\system32\bcdedit /emssettings emsbaudrate:9600 emsport:1" 20 | -------------------------------------------------------------------------------- /oem/sysprep.bat: -------------------------------------------------------------------------------- 1 | if exist C:\script.bat del C:\script.bat 2 | 3 | mkdir %WINDIR%\Setup\Scripts 4 | 5 | rem Disable WinRM when until Windows is not fully initialized / started 6 | netsh advfirewall firewall set rule name="Allow WinRM HTTPS" new action=block 7 | netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new action=block 8 | echo netsh advfirewall firewall set rule name="Allow WinRM HTTPS" new action=allow ^>^> %%WINDIR%%\Temp\SetupComplete.log >> %WINDIR%\Setup\Scripts\SetupComplete.cmd 9 | echo netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new action=allow ^>^> %%WINDIR%%\Temp\SetupComplete.log >> %WINDIR%\Setup\Scripts\SetupComplete.cmd 10 | 11 | %WINDIR%\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:%1 12 | -------------------------------------------------------------------------------- /oem/unattend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | 1 8 | Other 9 | true 10 | true 11 | true 12 | 13 | UTC 14 | 15 | 16 | 17 | admin 18 | admin 19 | 20 | administrators 21 | 22 | changeme 23 | true</PlainText> 24 | </Password> 25 | </LocalAccount> 26 | </LocalAccounts> 27 | </UserAccounts> 28 | </component> 29 | </settings> 30 | 31 | <settings pass="specialize"> 32 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 33 | <CopyProfile>false</CopyProfile> 34 | </component> 35 | </settings> 36 | 37 | </unattend> 38 | -------------------------------------------------------------------------------- /tools/click.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import pty 5 | import select 6 | import signal 7 | import sys 8 | import time 9 | 10 | 11 | VM = sys.argv[1] 12 | 13 | 14 | def rd(fd): 15 | p = select.poll() 16 | p.register(fd, select.POLLIN) 17 | _ = p.poll() 18 | return os.read(fd, 1024) 19 | 20 | 21 | def waitbooting(fd): 22 | buf = b'' 23 | while True: 24 | # UEFI or CSM 25 | if b'PciRoot' in buf or b'Booting from DVD/CD' in buf: 26 | break 27 | buf += rd(fd) 28 | 29 | 30 | pid, fd = pty.fork() 31 | if 0 == pid: 32 | os.execlp('incus', 'incus', 'start', '--console', sys.argv[1]) 33 | else: 34 | waitbooting(fd) 35 | print('[+] Spamming Enter for 10 seconds') 36 | for _ in range(10): 37 | os.write(fd, b'\r\n') 38 | time.sleep(1) 39 | 40 | print('[+] Releasing console') 41 | os.kill(pid, signal.SIGTERM) 42 | try: 43 | os.waitpid(pid, 0) 44 | except ChildProcessError as e: 45 | print('[+]', str(e)) 46 | 47 | print('[+] Letting the installer do its thing...') 48 | print('[+] Waiting for the VM to be stopped for 10 seconds') 49 | print("[+] You may connect to the VM's VGA using the following command") 50 | print('incus console --type=vga {}'.format(sys.argv[1])) 51 | n = 0 52 | while n < 10: 53 | s = os.popen('incus ls --format=csv -cs {}'.format(sys.argv[1])).read().strip() 54 | if 'STOPPED' == s: 55 | n += 1 56 | else: 57 | n = 0 58 | time.sleep(1) 59 | 60 | print('[+] VM stopped') 61 | -------------------------------------------------------------------------------- /tools/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Import an LXD VM image 4 | # 5 | set -eu 6 | 7 | PROGBASE=$(d=$(dirname -- "${0}"); cd "${d}" && pwd) 8 | PROGNAME=$(basename -- "${0}") 9 | 10 | usage() { 11 | printf 'usage: %s [-h] dir\n' "${PROGNAME}" 12 | } 13 | 14 | while getopts h- argv; do 15 | case "${argv}" in 16 | h) usage 17 | exit 0 18 | ;; 19 | -) break 20 | ;; 21 | *) usage >&2 22 | exit 1 23 | ;; 24 | esac 25 | shift $(( OPTIND + 1 )) 26 | done 27 | 28 | [ X-- != X"${1:-}" ] || shift 29 | 30 | if [ 1 -ne $# ]; then 31 | usage >&2 32 | exit 1 33 | fi 34 | 35 | # -------------------------------------------------------------------- # 36 | 37 | n=$(basename -- "${1}") 38 | exec incus image import "${1}/incus.tar.xz" "${1}/disk.qcow2" \ 39 | --alias "${n}" 40 | -------------------------------------------------------------------------------- /tools/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Start an LXD VM from an image. 4 | # 5 | set -eu 6 | 7 | PROGBASE=$(d=$(dirname -- "${0}"); cd "${d}" && pwd) 8 | PROGNAME=$(basename -- "${0}") 9 | 10 | usage() { 11 | printf 'usage: %s [-h] version\n' "${PROGNAME}" 12 | } 13 | 14 | while getopts h- argv; do 15 | case "${argv}" in 16 | h) usage 17 | exit 0 18 | ;; 19 | -) break 20 | ;; 21 | *) usage >&2 22 | exit 1 23 | ;; 24 | esac 25 | shift $(( OPTIND + 1 )) 26 | done 27 | 28 | [ X-- != X"${1:-}" ] || shift 29 | 30 | if [ 1 -ne $# ]; then 31 | usage >&2 32 | exit 1 33 | fi 34 | 35 | # -------------------------------------------------------------------- # 36 | 37 | incus init "win${1}" "win${1}" -c security.secureboot=false 38 | incus config device add "win${1}" cidata disk source=cloud-init:config 39 | exec incus start "win${1}" 40 | -------------------------------------------------------------------------------- /tools/metas/10e.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 10 Enterprise 5 | os: windows 6 | release: 10e 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/11e.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 11 Enterprise 5 | os: windows 6 | release: 11e 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2008.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 2008 R2 SP1 5 | os: windows 6 | release: 2008 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2012.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 2012 R2 Standard 5 | os: windows 6 | release: 2012 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2016.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 2016 Datacenter 5 | os: windows 6 | release: 2016 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2019.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 2019 Datacenter 5 | os: windows 6 | release: 2019 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2022.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows 2022 Datacenter 5 | os: windows 6 | release: 2022 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/metas/2025.in: -------------------------------------------------------------------------------- 1 | architecture: x86_64 2 | creation_date: @date@ 3 | properties: 4 | description: Microsoft Windows Server 2025 (Server Edition, Standard) 5 | os: windows 6 | release: 2025 7 | variant: default 8 | architecture: x86_64 9 | -------------------------------------------------------------------------------- /tools/mkmeta: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | PROGBASE=$(d=$(dirname -- "${0}"); cd "${d}" && pwd) 5 | PROGNAME=$(basename -- "${0}") 6 | 7 | usage() { 8 | printf 'usage: %s [-h] version\n' "${PROGNAME}" 9 | } 10 | 11 | while getopts h- argv; do 12 | case "${argv}" in 13 | h) usage 14 | exit 0 15 | ;; 16 | -) break 17 | ;; 18 | *) usage >&2 19 | exit 1 20 | ;; 21 | esac 22 | shift $(( OPTIND + 1 )) 23 | done 24 | 25 | [ X-- != X"${1:-}" ] || shift 26 | 27 | if [ 1 -ne $# ]; then 28 | usage >&2 29 | exit 1 30 | fi 31 | 32 | if [ -t 1 ]; then 33 | printf 'error: output must be piped to a file\n' >&2 34 | printf 'mkmeta version. >incus.tar.xz\n' >&2 35 | exit 1 36 | fi 37 | 38 | # -------------------------------------------------------------------- # 39 | 40 | tmpdir=$(mktemp -d) 41 | trap "/bin/rm -rf '${tmpdir}'" EXIT INT QUIT TERM 42 | 43 | cd "${tmpdir}" 44 | 45 | date=$(TZ= date +%s) 46 | sed -e "s|@date@|${date}|" "${PROGBASE}/metas/${1}.in" >metadata.yaml 47 | 48 | tar -f- -c metadata.yaml | xz -c9 49 | -------------------------------------------------------------------------------- /tools/pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # usage: $0 version windows.iso virtio.iso oem/ dest/ [local/] 4 | # 5 | set -eu 6 | 7 | PROGNAME=$(basename -- "${0}") 8 | PROGBASE=$(d=$(dirname -- "${0}"); cd "${d}" && pwd) 9 | PROJROOT=$(cd "${PROGBASE}/.." && pwd) 10 | 11 | VERSION="${1}" 12 | WINDOWS="${2}" 13 | VIRTIO="${3}" 14 | OEM=$(cd "${4}" && pwd) 15 | DESTDIR=$(cd "${5}" && pwd) 16 | LOCAL= 17 | [ X = X"${6:-}" ] || LOCAL=$(cd "${6}" && pwd) 18 | 19 | # -------------------------------------------------------------------- # 20 | 21 | TMPDIR="${PROJROOT}/tmp/" 22 | 23 | [ -d "${DESTDIR}" ] 24 | [ -d "${TMPDIR}" ] || mkdir "${TMPDIR}" 25 | 26 | WINFILE=$(basename "${WINDOWS}") 27 | WINDIR=$(d=$(dirname -- "${WINDOWS}"); cd "${d}" && pwd) 28 | VIRTIOFILE=$(basename "${VIRTIO}") 29 | VIRTIODIR=$(d=$(dirname -- "${VIRTIO}"); cd "${d}" && pwd) 30 | 31 | if [ X != X$(ls "${DESTDIR}") ]; then 32 | printf 'error: destination directory must be empty\n' >&2 33 | exit 1 34 | fi 35 | 36 | # -------------------------------------------------------------------- # 37 | 38 | name=build$(head -c6 /dev/urandom | od -tx1 -vAn | xargs printf %s) 39 | cleanup() { 40 | incus image rm "${name}" || : 41 | incus delete -f "${name}" 42 | } 43 | trap cleanup EXIT INT QUIT TERM 44 | 45 | # -------------------------------------------------------------------- # 46 | # virtio - repack 47 | 48 | printf '[+] Repacking ISO with unattended data\n' 49 | 50 | rm -rf "${TMPDIR}/virtio-win-${VERSION}/" 51 | xorriso -report_about SORRY -osirrox on -indev "${VIRTIODIR}/${VIRTIOFILE}" -extract / "${TMPDIR}/virtio-win-${VERSION}/" 52 | find "${TMPDIR}/virtio-win-${VERSION}/" -type d -exec chmod u+rwx {} \; 53 | 54 | cp -R "${OEM}" "${TMPDIR}/virtio-win-${VERSION}/OEM/" 55 | cp "${PROJROOT}/unattend/${VERSION}/Autounattend.xml" "${TMPDIR}/virtio-win-${VERSION}/" 56 | [ X = X"${LOCAL}" ] || cp -R "${LOCAL}" "${TMPDIR}/virtio-win-${VERSION}/local/" 57 | 58 | rm -f "${DESTDIR}/unattended-${VERSION}.iso" 59 | xorriso -as mkisofs -o "${DESTDIR}/unattended-${VERSION}.iso" -R -J -V STUFF "${TMPDIR}/virtio-win-${VERSION}/" 60 | 61 | # -------------------------------------------------------------------- # 62 | # launch VM in LXD 63 | 64 | apparmr() { 65 | cat<<__EOF__ 66 | ${WINDIR}/${WINFILE} rwk, 67 | ${DESTDIR}/unattended-${VERSION}.iso rwk, 68 | __EOF__ 69 | } 70 | 71 | printf '[+] Launching the VM\n' 72 | 73 | incus init "${name}" --empty --vm -c security.secureboot=false -c limits.cpu=4 -c limits.memory=8GB -d root,size=30GiB 74 | incus config device set "${name}" root io.bus=virtio-blk 75 | incus config device add "${name}" iso disk source="${WINDIR}/${WINFILE}" boot.priority=10 76 | apparmr | incus config set "${name}" raw.apparmor - 77 | printf -- '-drive file=%s,index=0,media=cdrom,if=ide -drive file=%s,index=1,media=cdrom,if=ide\n' "${WINDIR}/${WINFILE}" "${DESTDIR}/unattended-${VERSION}.iso" | incus config set "${name}" raw.qemu - 78 | 79 | if [ X2008 = X"${VERSION}" ]; then 80 | incus config set "${name}" security.csm=true 81 | fi 82 | 83 | if [ X11e = X"${VERSION}" ]; then 84 | printf '[+] Add Virtual TPM' 85 | incus config device add ${name} tpm tpm 86 | fi 87 | 88 | python3 "${PROGBASE}/click.py" "${name}" 89 | 90 | printf '[+] Converting the VM to an image\n' 91 | incus publish "${name}" --alias "${name}" --compression none 92 | 93 | printf '[+] Exporting the image\n' 94 | incus image export "${name}" "${DESTDIR}" 95 | 96 | printf '[+] Extracting disk.qcow2\n' 97 | cat "${DESTDIR}"/*.tar | tar -C "${DESTDIR}" -f- -x --transform s/rootfs.img/disk.qcow2/ rootfs.img 98 | # incus's disk.qcow2 file is not readable (mode=0) 99 | chmod 0644 "${DESTDIR}/disk.qcow2" 100 | rm -f "${DESTDIR}"/*.tar 101 | 102 | printf '[+] Image created\n' 103 | -------------------------------------------------------------------------------- /unattend/10e-20h2: -------------------------------------------------------------------------------- 1 | 10e -------------------------------------------------------------------------------- /unattend/10e-21h2: -------------------------------------------------------------------------------- 1 | 10e -------------------------------------------------------------------------------- /unattend/10e/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\w10\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\w10\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\w10\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Size>499</Size> 38 | </CreatePartition> 39 | <CreatePartition wcm:action="add"> 40 | <Order>2</Order> 41 | <Type>EFI</Type> 42 | <Size>100</Size> 43 | </CreatePartition> 44 | <CreatePartition wcm:action="add"> 45 | <Order>3</Order> 46 | <Type>Primary</Type> 47 | <Extend>true</Extend> 48 | </CreatePartition> 49 | </CreatePartitions> 50 | <ModifyPartitions> 51 | <ModifyPartition wcm:action="add"> 52 | <Order>1</Order> 53 | <PartitionID>1</PartitionID> 54 | <Format>NTFS</Format> 55 | <Label>Recovery</Label> 56 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 57 | </ModifyPartition> 58 | <ModifyPartition wcm:action="add"> 59 | <Order>2</Order> 60 | <PartitionID>2</PartitionID> 61 | <Label>System</Label> 62 | <Format>FAT32</Format> 63 | </ModifyPartition> 64 | <ModifyPartition wcm:action="add"> 65 | <Order>3</Order> 66 | <PartitionID>3</PartitionID> 67 | <Label>WINDOWS</Label> 68 | <Format>NTFS</Format> 69 | <Letter>C</Letter> 70 | </ModifyPartition> 71 | </ModifyPartitions> 72 | <DiskID>0</DiskID> 73 | <WillWipeDisk>true</WillWipeDisk> 74 | </Disk> 75 | </DiskConfiguration> 76 | <ImageInstall> 77 | <OSImage> 78 | <InstallFrom> 79 | <MetaData wcm:action="add"> 80 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 81 | <!-- wiminfo sources/install.wim --> 82 | <Key>/IMAGE/INDEX</Key> 83 | <Value>1</Value> 84 | </MetaData> 85 | </InstallFrom> 86 | <InstallTo> 87 | <DiskID>0</DiskID> 88 | <PartitionID>3</PartitionID> 89 | </InstallTo> 90 | </OSImage> 91 | </ImageInstall> 92 | <UserData> 93 | <ProductKey> 94 | <!-- <Key></Key> --> 95 | <WillShowUI>Never</WillShowUI> 96 | </ProductKey> 97 | <AcceptEula>true</AcceptEula> 98 | <FullName>Vagrant</FullName> 99 | <Organization>Vagrant</Organization> 100 | </UserData> 101 | </component> 102 | </settings> 103 | 104 | <settings pass="specialize"> 105 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 106 | <OEMInformation> 107 | <HelpCustomized>false</HelpCustomized> 108 | </OEMInformation> 109 | <TimeZone>UTC</TimeZone> 110 | <RegisteredOwner/> 111 | </component> 112 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 113 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 114 | </component> 115 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 116 | <IEHardenAdmin>false</IEHardenAdmin> 117 | <IEHardenUser>false</IEHardenUser> 118 | </component> 119 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 120 | <SearchScopes> 121 | <Scope wcm:action="add"> 122 | <ScopeDefault>true</ScopeDefault> 123 | <ScopeDisplayName>Google</ScopeDisplayName> 124 | <ScopeKey>Google</ScopeKey> 125 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 126 | </Scope> 127 | </SearchScopes> 128 | <DisableAccelerators>true</DisableAccelerators> 129 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 130 | <Home_Page>about:blank</Home_Page> 131 | </component> 132 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 133 | <fDenyTSConnections>false</fDenyTSConnections> 134 | </component> 135 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 136 | <UserAuthentication>0</UserAuthentication> 137 | </component> 138 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 139 | <FirewallGroups> 140 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 141 | <Active>true</Active> 142 | <Group>Remote Desktop</Group> 143 | <Profile>all</Profile> 144 | </FirewallGroup> 145 | </FirewallGroups> 146 | </component> 147 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 148 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 149 | </component> 150 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 151 | <SkipAutoActivation>true</SkipAutoActivation> 152 | </component> 153 | </settings> 154 | 155 | <settings pass="oobeSystem"> 156 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 157 | <UserAccounts> 158 | <AdministratorPassword> 159 | <Value>vagrant</Value> 160 | <PlainText>true</PlainText> 161 | </AdministratorPassword> 162 | </UserAccounts> 163 | <AutoLogon> 164 | <Password> 165 | <Value>vagrant</Value> 166 | <PlainText>true</PlainText> 167 | </Password> 168 | <Enabled>true</Enabled> 169 | <Username>administrator</Username> 170 | </AutoLogon> 171 | <FirstLogonCommands> 172 | <SynchronousCommand wcm:action="add"> 173 | <Order>1</Order> 174 | <Description>Set Execution Policy 64 Bit</Description> 175 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 176 | <RequiresUserInput>true</RequiresUserInput> 177 | </SynchronousCommand> 178 | <SynchronousCommand wcm:action="add"> 179 | <Order>2</Order> 180 | <Description>Run configuration script</Description> 181 | <CommandLine>cmd.exe /c powershell -File F:\OEM\main.ps1</CommandLine> 182 | <RequiresUserInput>true</RequiresUserInput> 183 | </SynchronousCommand> 184 | </FirstLogonCommands> 185 | <OOBE> 186 | <HideEULAPage>true</HideEULAPage> 187 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 188 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 189 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 190 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 191 | <NetworkLocation>Other</NetworkLocation> 192 | <ProtectYourPC>1</ProtectYourPC> 193 | </OOBE> 194 | <RegisteredOwner/> 195 | </component> 196 | 197 | <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 198 | <InputLocale>en-US</InputLocale> 199 | <SystemLocale>en-US</SystemLocale> 200 | <UILanguage>en-US</UILanguage> 201 | <UserLocale>en-US</UserLocale> 202 | </component> 203 | 204 | </settings> 205 | 206 | <settings pass="offlineServicing"> 207 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 208 | <EnableLUA>false</EnableLUA> 209 | </component> 210 | </settings> 211 | 212 | </unattend> 213 | -------------------------------------------------------------------------------- /unattend/11e/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\w11\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\w11\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\w11\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Size>499</Size> 38 | </CreatePartition> 39 | <CreatePartition wcm:action="add"> 40 | <Order>2</Order> 41 | <Type>EFI</Type> 42 | <Size>100</Size> 43 | </CreatePartition> 44 | <CreatePartition wcm:action="add"> 45 | <Order>3</Order> 46 | <Type>MSR</Type> 47 | <Size>16</Size> 48 | </CreatePartition> 49 | <CreatePartition wcm:action="add"> 50 | <Order>4</Order> 51 | <Type>Primary</Type> 52 | <Extend>true</Extend> 53 | </CreatePartition> 54 | </CreatePartitions> 55 | <ModifyPartitions> 56 | <ModifyPartition wcm:action="add"> 57 | <Order>1</Order> 58 | <PartitionID>1</PartitionID> 59 | <Format>NTFS</Format> 60 | <Label>Recovery</Label> 61 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 62 | </ModifyPartition> 63 | <ModifyPartition wcm:action="add"> 64 | <Order>2</Order> 65 | <PartitionID>2</PartitionID> 66 | <Label>System</Label> 67 | <Format>FAT32</Format> 68 | </ModifyPartition> 69 | <ModifyPartition wcm:action="add"> 70 | <Order>3</Order> 71 | <PartitionID>3</PartitionID> 72 | </ModifyPartition> 73 | <ModifyPartition wcm:action="add"> 74 | <Order>4</Order> 75 | <PartitionID>4</PartitionID> 76 | <Label>WINDOWS</Label> 77 | <Format>NTFS</Format> 78 | <Letter>C</Letter> 79 | </ModifyPartition> 80 | </ModifyPartitions> 81 | <DiskID>0</DiskID> 82 | <WillWipeDisk>true</WillWipeDisk> 83 | </Disk> 84 | </DiskConfiguration> 85 | <ImageInstall> 86 | <OSImage> 87 | <InstallFrom> 88 | <MetaData wcm:action="add"> 89 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 90 | <!-- wiminfo sources/install.wim --> 91 | <Key>/IMAGE/INDEX</Key> 92 | <Value>1</Value> 93 | </MetaData> 94 | </InstallFrom> 95 | <InstallTo> 96 | <DiskID>0</DiskID> 97 | <PartitionID>4</PartitionID> 98 | </InstallTo> 99 | </OSImage> 100 | </ImageInstall> 101 | <UserData> 102 | <ProductKey> 103 | <!-- <Key></Key> --> 104 | <WillShowUI>Never</WillShowUI> 105 | </ProductKey> 106 | <AcceptEula>true</AcceptEula> 107 | <FullName>Vagrant</FullName> 108 | <Organization>Vagrant</Organization> 109 | </UserData> 110 | </component> 111 | </settings> 112 | 113 | <settings pass="specialize"> 114 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 115 | <OEMInformation> 116 | <HelpCustomized>false</HelpCustomized> 117 | </OEMInformation> 118 | <TimeZone>UTC</TimeZone> 119 | <RegisteredOwner/> 120 | </component> 121 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 122 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 123 | </component> 124 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 125 | <IEHardenAdmin>false</IEHardenAdmin> 126 | <IEHardenUser>false</IEHardenUser> 127 | </component> 128 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 129 | <SearchScopes> 130 | <Scope wcm:action="add"> 131 | <ScopeDefault>true</ScopeDefault> 132 | <ScopeDisplayName>Google</ScopeDisplayName> 133 | <ScopeKey>Google</ScopeKey> 134 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 135 | </Scope> 136 | </SearchScopes> 137 | <DisableAccelerators>true</DisableAccelerators> 138 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 139 | <Home_Page>about:blank</Home_Page> 140 | </component> 141 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 142 | <fDenyTSConnections>false</fDenyTSConnections> 143 | </component> 144 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 145 | <UserAuthentication>0</UserAuthentication> 146 | </component> 147 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 148 | <FirewallGroups> 149 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 150 | <Active>true</Active> 151 | <Group>Remote Desktop</Group> 152 | <Profile>all</Profile> 153 | </FirewallGroup> 154 | </FirewallGroups> 155 | </component> 156 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 157 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 158 | </component> 159 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 160 | <SkipAutoActivation>true</SkipAutoActivation> 161 | </component> 162 | </settings> 163 | 164 | <settings pass="oobeSystem"> 165 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 166 | <UserAccounts> 167 | <AdministratorPassword> 168 | <Value>vagrant</Value> 169 | <PlainText>true</PlainText> 170 | </AdministratorPassword> 171 | </UserAccounts> 172 | <AutoLogon> 173 | <Password> 174 | <Value>vagrant</Value> 175 | <PlainText>true</PlainText> 176 | </Password> 177 | <Enabled>true</Enabled> 178 | <Username>administrator</Username> 179 | </AutoLogon> 180 | <FirstLogonCommands> 181 | <SynchronousCommand wcm:action="add"> 182 | <Order>1</Order> 183 | <Description>Set Execution Policy 64 Bit</Description> 184 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 185 | <RequiresUserInput>true</RequiresUserInput> 186 | </SynchronousCommand> 187 | <SynchronousCommand wcm:action="add"> 188 | <Order>2</Order> 189 | <Description>Run configuration script</Description> 190 | <CommandLine>cmd.exe /c powershell -File F:\OEM\main.ps1</CommandLine> 191 | <RequiresUserInput>true</RequiresUserInput> 192 | </SynchronousCommand> 193 | </FirstLogonCommands> 194 | <OOBE> 195 | <HideEULAPage>true</HideEULAPage> 196 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 197 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 198 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 199 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 200 | <NetworkLocation>Other</NetworkLocation> 201 | <ProtectYourPC>1</ProtectYourPC> 202 | </OOBE> 203 | <RegisteredOwner/> 204 | </component> 205 | 206 | <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 207 | <InputLocale>en-US</InputLocale> 208 | <SystemLocale>en-US</SystemLocale> 209 | <UILanguage>en-US</UILanguage> 210 | <UserLocale>en-US</UserLocale> 211 | </component> 212 | 213 | </settings> 214 | 215 | <settings pass="offlineServicing"> 216 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 217 | <EnableLUA>false</EnableLUA> 218 | </component> 219 | </settings> 220 | 221 | </unattend> 222 | -------------------------------------------------------------------------------- /unattend/2008/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\2k8R2\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\2k8R2\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\2k8R2\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Extend>true</Extend> 38 | </CreatePartition> 39 | </CreatePartitions> 40 | <ModifyPartitions> 41 | <ModifyPartition wcm:action="add"> 42 | <Order>1</Order> 43 | <PartitionID>1</PartitionID> 44 | <Format>NTFS</Format> 45 | <Label>WINDOWS</Label> 46 | <Letter>C</Letter> 47 | <Extend>false</Extend> 48 | </ModifyPartition> 49 | </ModifyPartitions> 50 | <DiskID>0</DiskID> 51 | <WillWipeDisk>true</WillWipeDisk> 52 | </Disk> 53 | <WillShowUI>OnError</WillShowUI> 54 | </DiskConfiguration> 55 | <ImageInstall> 56 | <OSImage> 57 | <InstallFrom> 58 | <MetaData wcm:action="add"> 59 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 60 | <!-- wiminfo sources/install.wim --> 61 | <Key>/IMAGE/INDEX</Key> 62 | <Value>5</Value> 63 | </MetaData> 64 | </InstallFrom> 65 | <InstallTo> 66 | <DiskID>0</DiskID> 67 | <PartitionID>1</PartitionID> 68 | </InstallTo> 69 | <InstallToAvailablePartition>false</InstallToAvailablePartition> 70 | </OSImage> 71 | </ImageInstall> 72 | <UserData> 73 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 74 | <ProductKey> 75 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 76 | <WillShowUI>OnError</WillShowUI> 77 | </ProductKey> 78 | <AcceptEula>true</AcceptEula> 79 | <FullName>Vagrant</FullName> 80 | <Organization>Vagrant</Organization> 81 | </UserData> 82 | </component> 83 | </settings> 84 | 85 | <settings pass="specialize"> 86 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 87 | <OEMInformation> 88 | <HelpCustomized>false</HelpCustomized> 89 | </OEMInformation> 90 | <TimeZone>UTC</TimeZone> 91 | <RegisteredOwner/> 92 | </component> 93 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 94 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 95 | </component> 96 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 97 | <IEHardenAdmin>false</IEHardenAdmin> 98 | <IEHardenUser>false</IEHardenUser> 99 | </component> 100 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 101 | <SearchScopes> 102 | <Scope wcm:action="add"> 103 | <ScopeDefault>true</ScopeDefault> 104 | <ScopeDisplayName>Google</ScopeDisplayName> 105 | <ScopeKey>Google</ScopeKey> 106 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 107 | </Scope> 108 | </SearchScopes> 109 | <DisableAccelerators>true</DisableAccelerators> 110 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 111 | <Home_Page>about:blank</Home_Page> 112 | </component> 113 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 114 | <fDenyTSConnections>false</fDenyTSConnections> 115 | </component> 116 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 117 | <UserAuthentication>0</UserAuthentication> 118 | </component> 119 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 120 | <FirewallGroups> 121 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 122 | <Active>true</Active> 123 | <Group>Remote Desktop</Group> 124 | <Profile>all</Profile> 125 | </FirewallGroup> 126 | </FirewallGroups> 127 | </component> 128 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 129 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 130 | </component> 131 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 132 | <SkipAutoActivation>true</SkipAutoActivation> 133 | </component> 134 | </settings> 135 | 136 | <settings pass="oobeSystem"> 137 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 138 | <UserAccounts> 139 | <AdministratorPassword> 140 | <Value>vagrant</Value> 141 | <PlainText>true</PlainText> 142 | </AdministratorPassword> 143 | </UserAccounts> 144 | <AutoLogon> 145 | <Password> 146 | <Value>vagrant</Value> 147 | <PlainText>true</PlainText> 148 | </Password> 149 | <Enabled>true</Enabled> 150 | <Username>administrator</Username> 151 | </AutoLogon> 152 | <FirstLogonCommands> 153 | <SynchronousCommand wcm:action="add"> 154 | <Order>1</Order> 155 | <Description>Set Execution Policy 64 Bit</Description> 156 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 157 | <RequiresUserInput>true</RequiresUserInput> 158 | </SynchronousCommand> 159 | <SynchronousCommand wcm:action="add"> 160 | <Order>2</Order> 161 | <Description>Hide "New network" banner</Description> 162 | <CommandLine>cmd.exe /c reg add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine> 163 | <RequiresUserInput>true</RequiresUserInput> 164 | </SynchronousCommand> 165 | <SynchronousCommand wcm:action="add"> 166 | <Order>8</Order> 167 | <Description>Empty hibernation file</Description> 168 | <CommandLine>%SYSTEMROOT%\System32\reg.exe ADD HKLM\SYSTEM\CurrentCOntrolSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine> 169 | <RequiresUserInput>true</RequiresUserInput> 170 | </SynchronousCommand> 171 | <SynchronousCommand wcm:action="add"> 172 | <Order>9</Order> 173 | <Description>Disable hibernation</Description> 174 | <CommandLine>%SYSTEMROOT%\System32\reg.exe ADD HKLM\SYSTEM\CurrentCOntrolSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine> 175 | <RequiresUserInput>true</RequiresUserInput> 176 | </SynchronousCommand> 177 | </FirstLogonCommands> 178 | <OOBE> 179 | <HideEULAPage>true</HideEULAPage> 180 | <!--<HideLocalAccountScreen>true</HideLocalAccountScreen>--> 181 | <!--<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>--> 182 | <!--<HideOnlineAccountScreens>true</HideOnlineAccountScreens>--> 183 | <!--<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>--> 184 | <NetworkLocation>Other</NetworkLocation> 185 | <ProtectYourPC>1</ProtectYourPC> 186 | </OOBE> 187 | <RegisteredOwner/> 188 | </component> 189 | </settings> 190 | 191 | <settings pass="offlineServicing"> 192 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 193 | <EnableLUA>false</EnableLUA> 194 | </component> 195 | 196 | <!-- https://serverfault.com/questions/471961/server-2012-autounattend-xml-make-offline-drives-online --> 197 | <!-- https://social.technet.microsoft.com/Forums/exchange/en-US/d3da24c1-adb3-43e4-8dba-b62c4f4d24a8/mdt-deployment-windows-server-2008-enterprise-disk-1-offline?forum=winserversetup --> 198 | <!-- <component name="Microsoft-Windows-PartitionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 199 | <SanPolicy>1</SanPolicy> 200 | </component> --> 201 | </settings> 202 | 203 | </unattend> 204 | -------------------------------------------------------------------------------- /unattend/2012/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <!-- 2012 R2 drivers aren't signed --> 18 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 19 | <Path>E:\viostor\2k16\amd64</Path> 20 | </PathAndCredentials> 21 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 22 | <Path>E:\NetKVM\2k16\amd64</Path> 23 | </PathAndCredentials> 24 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 25 | <Path>E:\vioscsi\2k16\amd64</Path> 26 | </PathAndCredentials> 27 | </DriverPaths> 28 | </component> 29 | 30 | 31 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 32 | <DiskConfiguration> 33 | <Disk wcm:action="add"> 34 | <CreatePartitions> 35 | <CreatePartition wcm:action="add"> 36 | <Order>1</Order> 37 | <Type>Primary</Type> 38 | <Size>499</Size> 39 | </CreatePartition> 40 | <CreatePartition wcm:action="add"> 41 | <Order>2</Order> 42 | <Type>EFI</Type> 43 | <Size>100</Size> 44 | </CreatePartition> 45 | <CreatePartition wcm:action="add"> 46 | <Order>3</Order> 47 | <Type>MSR</Type> 48 | <Size>128</Size> 49 | </CreatePartition> 50 | <CreatePartition wcm:action="add"> 51 | <Order>4</Order> 52 | <Type>Primary</Type> 53 | <Extend>true</Extend> 54 | </CreatePartition> 55 | </CreatePartitions> 56 | <ModifyPartitions> 57 | <ModifyPartition wcm:action="add"> 58 | <Order>1</Order> 59 | <PartitionID>1</PartitionID> 60 | <Format>NTFS</Format> 61 | <Label>Recovery</Label> 62 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 63 | </ModifyPartition> 64 | <ModifyPartition wcm:action="add"> 65 | <Order>2</Order> 66 | <PartitionID>2</PartitionID> 67 | <Label>System</Label> 68 | <Format>FAT32</Format> 69 | </ModifyPartition> 70 | <ModifyPartition wcm:action="add"> 71 | <Order>3</Order> 72 | <PartitionID>3</PartitionID> 73 | </ModifyPartition> 74 | <ModifyPartition wcm:action="add"> 75 | <Order>4</Order> 76 | <PartitionID>4</PartitionID> 77 | <Label>WINDOWS</Label> 78 | <Format>NTFS</Format> 79 | <Letter>C</Letter> 80 | </ModifyPartition> 81 | </ModifyPartitions> 82 | <DiskID>0</DiskID> 83 | <WillWipeDisk>true</WillWipeDisk> 84 | </Disk> 85 | </DiskConfiguration> 86 | <ImageInstall> 87 | <OSImage> 88 | <InstallFrom> 89 | <MetaData wcm:action="add"> 90 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 91 | <!-- wiminfo sources/install.wim --> 92 | <Key>/IMAGE/INDEX</Key> 93 | <Value>4</Value> 94 | </MetaData> 95 | </InstallFrom> 96 | <InstallTo> 97 | <DiskID>0</DiskID> 98 | <PartitionID>4</PartitionID> 99 | </InstallTo> 100 | </OSImage> 101 | </ImageInstall> 102 | <UserData> 103 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 104 | <ProductKey> 105 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 106 | <WillShowUI>OnError</WillShowUI> 107 | </ProductKey> 108 | <AcceptEula>true</AcceptEula> 109 | <FullName>Vagrant</FullName> 110 | <Organization>Vagrant</Organization> 111 | </UserData> 112 | </component> 113 | </settings> 114 | 115 | <settings pass="specialize"> 116 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 117 | <OEMInformation> 118 | <HelpCustomized>false</HelpCustomized> 119 | </OEMInformation> 120 | <TimeZone>UTC</TimeZone> 121 | <RegisteredOwner/> 122 | </component> 123 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 124 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 125 | </component> 126 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 127 | <IEHardenAdmin>false</IEHardenAdmin> 128 | <IEHardenUser>false</IEHardenUser> 129 | </component> 130 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 131 | <SearchScopes> 132 | <Scope wcm:action="add"> 133 | <ScopeDefault>true</ScopeDefault> 134 | <ScopeDisplayName>Google</ScopeDisplayName> 135 | <ScopeKey>Google</ScopeKey> 136 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 137 | </Scope> 138 | </SearchScopes> 139 | <DisableAccelerators>true</DisableAccelerators> 140 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 141 | <Home_Page>about:blank</Home_Page> 142 | </component> 143 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 144 | <fDenyTSConnections>false</fDenyTSConnections> 145 | </component> 146 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 147 | <UserAuthentication>0</UserAuthentication> 148 | </component> 149 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 150 | <FirewallGroups> 151 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 152 | <Active>true</Active> 153 | <Group>Remote Desktop</Group> 154 | <Profile>all</Profile> 155 | </FirewallGroup> 156 | </FirewallGroups> 157 | </component> 158 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 159 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 160 | </component> 161 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 162 | <SkipAutoActivation>true</SkipAutoActivation> 163 | </component> 164 | </settings> 165 | 166 | <settings pass="oobeSystem"> 167 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 168 | <UserAccounts> 169 | <AdministratorPassword> 170 | <Value>vagrant</Value> 171 | <PlainText>true</PlainText> 172 | </AdministratorPassword> 173 | </UserAccounts> 174 | <AutoLogon> 175 | <Password> 176 | <Value>vagrant</Value> 177 | <PlainText>true</PlainText> 178 | </Password> 179 | <Enabled>true</Enabled> 180 | <Username>administrator</Username> 181 | </AutoLogon> 182 | <FirstLogonCommands> 183 | <SynchronousCommand wcm:action="add"> 184 | <Order>1</Order> 185 | <Description>Set Execution Policy 64 Bit</Description> 186 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 187 | <RequiresUserInput>true</RequiresUserInput> 188 | </SynchronousCommand> 189 | <SynchronousCommand wcm:action="add"> 190 | <Order>2</Order> 191 | <Description>Run configuration script</Description> 192 | <CommandLine>cmd.exe /c powershell -File E:\OEM\main.ps1</CommandLine> 193 | <RequiresUserInput>true</RequiresUserInput> 194 | </SynchronousCommand> 195 | </FirstLogonCommands> 196 | <OOBE> 197 | <HideEULAPage>true</HideEULAPage> 198 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 199 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 200 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 201 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 202 | <NetworkLocation>Other</NetworkLocation> 203 | <ProtectYourPC>1</ProtectYourPC> 204 | </OOBE> 205 | <RegisteredOwner/> 206 | </component> 207 | </settings> 208 | 209 | <settings pass="offlineServicing"> 210 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 211 | <EnableLUA>false</EnableLUA> 212 | </component> 213 | </settings> 214 | 215 | </unattend> 216 | -------------------------------------------------------------------------------- /unattend/2016/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\2k16\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\2k16\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\2k16\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Size>499</Size> 38 | </CreatePartition> 39 | <CreatePartition wcm:action="add"> 40 | <Order>2</Order> 41 | <Type>EFI</Type> 42 | <Size>100</Size> 43 | </CreatePartition> 44 | <CreatePartition wcm:action="add"> 45 | <Order>3</Order> 46 | <Type>Primary</Type> 47 | <Extend>true</Extend> 48 | </CreatePartition> 49 | </CreatePartitions> 50 | <ModifyPartitions> 51 | <ModifyPartition wcm:action="add"> 52 | <Order>1</Order> 53 | <PartitionID>1</PartitionID> 54 | <Format>NTFS</Format> 55 | <Label>Recovery</Label> 56 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 57 | </ModifyPartition> 58 | <ModifyPartition wcm:action="add"> 59 | <Order>2</Order> 60 | <PartitionID>2</PartitionID> 61 | <Label>System</Label> 62 | <Format>FAT32</Format> 63 | </ModifyPartition> 64 | <ModifyPartition wcm:action="add"> 65 | <Order>3</Order> 66 | <PartitionID>3</PartitionID> 67 | <Label>WINDOWS</Label> 68 | <Format>NTFS</Format> 69 | <Letter>C</Letter> 70 | </ModifyPartition> 71 | </ModifyPartitions> 72 | <DiskID>0</DiskID> 73 | <WillWipeDisk>true</WillWipeDisk> 74 | </Disk> 75 | </DiskConfiguration> 76 | <ImageInstall> 77 | <OSImage> 78 | <InstallFrom> 79 | <MetaData wcm:action="add"> 80 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 81 | <!-- wiminfo sources/install.wim --> 82 | <Key>/IMAGE/INDEX</Key> 83 | <Value>4</Value> 84 | </MetaData> 85 | </InstallFrom> 86 | <InstallTo> 87 | <DiskID>0</DiskID> 88 | <PartitionID>3</PartitionID> 89 | </InstallTo> 90 | </OSImage> 91 | </ImageInstall> 92 | <UserData> 93 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 94 | <ProductKey> 95 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 96 | <WillShowUI>OnError</WillShowUI> 97 | </ProductKey> 98 | <AcceptEula>true</AcceptEula> 99 | <FullName>Vagrant</FullName> 100 | <Organization>Vagrant</Organization> 101 | </UserData> 102 | </component> 103 | </settings> 104 | 105 | <settings pass="specialize"> 106 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 107 | <OEMInformation> 108 | <HelpCustomized>false</HelpCustomized> 109 | </OEMInformation> 110 | <TimeZone>UTC</TimeZone> 111 | <RegisteredOwner/> 112 | </component> 113 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 114 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 115 | </component> 116 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 117 | <IEHardenAdmin>false</IEHardenAdmin> 118 | <IEHardenUser>false</IEHardenUser> 119 | </component> 120 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 121 | <SearchScopes> 122 | <Scope wcm:action="add"> 123 | <ScopeDefault>true</ScopeDefault> 124 | <ScopeDisplayName>Google</ScopeDisplayName> 125 | <ScopeKey>Google</ScopeKey> 126 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 127 | </Scope> 128 | </SearchScopes> 129 | <DisableAccelerators>true</DisableAccelerators> 130 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 131 | <Home_Page>about:blank</Home_Page> 132 | </component> 133 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 134 | <fDenyTSConnections>false</fDenyTSConnections> 135 | </component> 136 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 137 | <UserAuthentication>0</UserAuthentication> 138 | </component> 139 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 140 | <FirewallGroups> 141 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 142 | <Active>true</Active> 143 | <Group>Remote Desktop</Group> 144 | <Profile>all</Profile> 145 | </FirewallGroup> 146 | </FirewallGroups> 147 | </component> 148 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 149 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 150 | </component> 151 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 152 | <SkipAutoActivation>true</SkipAutoActivation> 153 | </component> 154 | </settings> 155 | 156 | <settings pass="oobeSystem"> 157 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 158 | <UserAccounts> 159 | <AdministratorPassword> 160 | <Value>vagrant</Value> 161 | <PlainText>true</PlainText> 162 | </AdministratorPassword> 163 | </UserAccounts> 164 | <AutoLogon> 165 | <Password> 166 | <Value>vagrant</Value> 167 | <PlainText>true</PlainText> 168 | </Password> 169 | <Enabled>true</Enabled> 170 | <Username>administrator</Username> 171 | </AutoLogon> 172 | <FirstLogonCommands> 173 | <SynchronousCommand wcm:action="add"> 174 | <Order>1</Order> 175 | <Description>Set Execution Policy 64 Bit</Description> 176 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 177 | <RequiresUserInput>true</RequiresUserInput> 178 | </SynchronousCommand> 179 | <SynchronousCommand wcm:action="add"> 180 | <Order>2</Order> 181 | <Description>Run configuration script</Description> 182 | <CommandLine>cmd.exe /c powershell -File E:\OEM\main.ps1</CommandLine> 183 | <RequiresUserInput>true</RequiresUserInput> 184 | </SynchronousCommand> 185 | </FirstLogonCommands> 186 | <OOBE> 187 | <HideEULAPage>true</HideEULAPage> 188 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 189 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 190 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 191 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 192 | <NetworkLocation>Other</NetworkLocation> 193 | <ProtectYourPC>1</ProtectYourPC> 194 | </OOBE> 195 | <RegisteredOwner/> 196 | </component> 197 | </settings> 198 | 199 | <settings pass="offlineServicing"> 200 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 201 | <EnableLUA>false</EnableLUA> 202 | </component> 203 | </settings> 204 | 205 | </unattend> 206 | -------------------------------------------------------------------------------- /unattend/2019/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\2k19\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\2k19\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\2k19\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Size>499</Size> 38 | </CreatePartition> 39 | <CreatePartition wcm:action="add"> 40 | <Order>2</Order> 41 | <Type>EFI</Type> 42 | <Size>100</Size> 43 | </CreatePartition> 44 | <CreatePartition wcm:action="add"> 45 | <Order>3</Order> 46 | <Type>Primary</Type> 47 | <Extend>true</Extend> 48 | </CreatePartition> 49 | </CreatePartitions> 50 | <ModifyPartitions> 51 | <ModifyPartition wcm:action="add"> 52 | <Order>1</Order> 53 | <PartitionID>1</PartitionID> 54 | <Format>NTFS</Format> 55 | <Label>Recovery</Label> 56 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 57 | </ModifyPartition> 58 | <ModifyPartition wcm:action="add"> 59 | <Order>2</Order> 60 | <PartitionID>2</PartitionID> 61 | <Label>System</Label> 62 | <Format>FAT32</Format> 63 | </ModifyPartition> 64 | <ModifyPartition wcm:action="add"> 65 | <Order>3</Order> 66 | <PartitionID>3</PartitionID> 67 | <Label>WINDOWS</Label> 68 | <Format>NTFS</Format> 69 | <Letter>C</Letter> 70 | </ModifyPartition> 71 | </ModifyPartitions> 72 | <DiskID>0</DiskID> 73 | <WillWipeDisk>true</WillWipeDisk> 74 | </Disk> 75 | </DiskConfiguration> 76 | <ImageInstall> 77 | <OSImage> 78 | <InstallFrom> 79 | <MetaData wcm:action="add"> 80 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 81 | <!-- wiminfo sources/install.wim --> 82 | <Key>/IMAGE/INDEX</Key> 83 | <Value>4</Value> 84 | </MetaData> 85 | </InstallFrom> 86 | <InstallTo> 87 | <DiskID>0</DiskID> 88 | <PartitionID>3</PartitionID> 89 | </InstallTo> 90 | </OSImage> 91 | </ImageInstall> 92 | <UserData> 93 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 94 | <ProductKey> 95 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 96 | <WillShowUI>OnError</WillShowUI> 97 | </ProductKey> 98 | <AcceptEula>true</AcceptEula> 99 | <FullName>Vagrant</FullName> 100 | <Organization>Vagrant</Organization> 101 | </UserData> 102 | </component> 103 | </settings> 104 | 105 | <settings pass="specialize"> 106 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 107 | <OEMInformation> 108 | <HelpCustomized>false</HelpCustomized> 109 | </OEMInformation> 110 | <TimeZone>UTC</TimeZone> 111 | <RegisteredOwner/> 112 | </component> 113 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 114 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 115 | </component> 116 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 117 | <IEHardenAdmin>false</IEHardenAdmin> 118 | <IEHardenUser>false</IEHardenUser> 119 | </component> 120 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 121 | <SearchScopes> 122 | <Scope wcm:action="add"> 123 | <ScopeDefault>true</ScopeDefault> 124 | <ScopeDisplayName>Google</ScopeDisplayName> 125 | <ScopeKey>Google</ScopeKey> 126 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 127 | </Scope> 128 | </SearchScopes> 129 | <DisableAccelerators>true</DisableAccelerators> 130 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 131 | <Home_Page>about:blank</Home_Page> 132 | </component> 133 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 134 | <fDenyTSConnections>false</fDenyTSConnections> 135 | </component> 136 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 137 | <UserAuthentication>0</UserAuthentication> 138 | </component> 139 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 140 | <FirewallGroups> 141 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 142 | <Active>true</Active> 143 | <Group>Remote Desktop</Group> 144 | <Profile>all</Profile> 145 | </FirewallGroup> 146 | </FirewallGroups> 147 | </component> 148 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 149 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 150 | </component> 151 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 152 | <SkipAutoActivation>true</SkipAutoActivation> 153 | </component> 154 | </settings> 155 | 156 | <settings pass="oobeSystem"> 157 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 158 | <UserAccounts> 159 | <AdministratorPassword> 160 | <Value>vagrant</Value> 161 | <PlainText>true</PlainText> 162 | </AdministratorPassword> 163 | </UserAccounts> 164 | <AutoLogon> 165 | <Password> 166 | <Value>vagrant</Value> 167 | <PlainText>true</PlainText> 168 | </Password> 169 | <Enabled>true</Enabled> 170 | <Username>administrator</Username> 171 | </AutoLogon> 172 | <FirstLogonCommands> 173 | <SynchronousCommand wcm:action="add"> 174 | <Order>1</Order> 175 | <Description>Set Execution Policy 64 Bit</Description> 176 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 177 | <RequiresUserInput>true</RequiresUserInput> 178 | </SynchronousCommand> 179 | <SynchronousCommand wcm:action="add"> 180 | <Order>2</Order> 181 | <Description>Run configuration script</Description> 182 | <CommandLine>cmd.exe /c powershell -File F:\OEM\main.ps1</CommandLine> 183 | <RequiresUserInput>true</RequiresUserInput> 184 | </SynchronousCommand> 185 | </FirstLogonCommands> 186 | <OOBE> 187 | <HideEULAPage>true</HideEULAPage> 188 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 189 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 190 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 191 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 192 | <NetworkLocation>Other</NetworkLocation> 193 | <ProtectYourPC>1</ProtectYourPC> 194 | </OOBE> 195 | <RegisteredOwner/> 196 | </component> 197 | </settings> 198 | 199 | <settings pass="offlineServicing"> 200 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 201 | <EnableLUA>false</EnableLUA> 202 | </component> 203 | </settings> 204 | 205 | </unattend> 206 | -------------------------------------------------------------------------------- /unattend/2022/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\2k22\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\2k22\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\2k22\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | 30 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 31 | <DiskConfiguration> 32 | <Disk wcm:action="add"> 33 | <CreatePartitions> 34 | <CreatePartition wcm:action="add"> 35 | <Order>1</Order> 36 | <Type>Primary</Type> 37 | <Size>499</Size> 38 | </CreatePartition> 39 | <CreatePartition wcm:action="add"> 40 | <Order>2</Order> 41 | <Type>EFI</Type> 42 | <Size>100</Size> 43 | </CreatePartition> 44 | <CreatePartition wcm:action="add"> 45 | <Order>3</Order> 46 | <Type>Primary</Type> 47 | <Extend>true</Extend> 48 | </CreatePartition> 49 | </CreatePartitions> 50 | <ModifyPartitions> 51 | <ModifyPartition wcm:action="add"> 52 | <Order>1</Order> 53 | <PartitionID>1</PartitionID> 54 | <Format>NTFS</Format> 55 | <Label>Recovery</Label> 56 | <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> 57 | </ModifyPartition> 58 | <ModifyPartition wcm:action="add"> 59 | <Order>2</Order> 60 | <PartitionID>2</PartitionID> 61 | <Label>System</Label> 62 | <Format>FAT32</Format> 63 | </ModifyPartition> 64 | <ModifyPartition wcm:action="add"> 65 | <Order>3</Order> 66 | <PartitionID>3</PartitionID> 67 | <Label>WINDOWS</Label> 68 | <Format>NTFS</Format> 69 | <Letter>C</Letter> 70 | </ModifyPartition> 71 | </ModifyPartitions> 72 | <DiskID>0</DiskID> 73 | <WillWipeDisk>true</WillWipeDisk> 74 | </Disk> 75 | </DiskConfiguration> 76 | <ImageInstall> 77 | <OSImage> 78 | <InstallFrom> 79 | <MetaData wcm:action="add"> 80 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 81 | <!-- wiminfo sources/install.wim --> 82 | <Key>/IMAGE/INDEX</Key> 83 | <Value>4</Value> 84 | </MetaData> 85 | </InstallFrom> 86 | <InstallTo> 87 | <DiskID>0</DiskID> 88 | <PartitionID>3</PartitionID> 89 | </InstallTo> 90 | </OSImage> 91 | </ImageInstall> 92 | <UserData> 93 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 94 | <ProductKey> 95 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 96 | <WillShowUI>OnError</WillShowUI> 97 | </ProductKey> 98 | <AcceptEula>true</AcceptEula> 99 | <FullName>Vagrant</FullName> 100 | <Organization>Vagrant</Organization> 101 | </UserData> 102 | </component> 103 | </settings> 104 | 105 | <settings pass="specialize"> 106 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 107 | <OEMInformation> 108 | <HelpCustomized>false</HelpCustomized> 109 | </OEMInformation> 110 | <TimeZone>UTC</TimeZone> 111 | <RegisteredOwner/> 112 | </component> 113 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 114 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 115 | </component> 116 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 117 | <IEHardenAdmin>false</IEHardenAdmin> 118 | <IEHardenUser>false</IEHardenUser> 119 | </component> 120 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 121 | <SearchScopes> 122 | <Scope wcm:action="add"> 123 | <ScopeDefault>true</ScopeDefault> 124 | <ScopeDisplayName>Google</ScopeDisplayName> 125 | <ScopeKey>Google</ScopeKey> 126 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 127 | </Scope> 128 | </SearchScopes> 129 | <DisableAccelerators>true</DisableAccelerators> 130 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 131 | <Home_Page>about:blank</Home_Page> 132 | </component> 133 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 134 | <fDenyTSConnections>false</fDenyTSConnections> 135 | </component> 136 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 137 | <UserAuthentication>0</UserAuthentication> 138 | </component> 139 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 140 | <FirewallGroups> 141 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 142 | <Active>true</Active> 143 | <Group>Remote Desktop</Group> 144 | <Profile>all</Profile> 145 | </FirewallGroup> 146 | </FirewallGroups> 147 | </component> 148 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 149 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 150 | </component> 151 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 152 | <SkipAutoActivation>true</SkipAutoActivation> 153 | </component> 154 | </settings> 155 | 156 | <settings pass="oobeSystem"> 157 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 158 | <UserAccounts> 159 | <AdministratorPassword> 160 | <Value>vagrant</Value> 161 | <PlainText>true</PlainText> 162 | </AdministratorPassword> 163 | </UserAccounts> 164 | <AutoLogon> 165 | <Password> 166 | <Value>vagrant</Value> 167 | <PlainText>true</PlainText> 168 | </Password> 169 | <Enabled>true</Enabled> 170 | <Username>administrator</Username> 171 | </AutoLogon> 172 | <FirstLogonCommands> 173 | <SynchronousCommand wcm:action="add"> 174 | <Order>1</Order> 175 | <Description>Set Execution Policy 64 Bit</Description> 176 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 177 | <RequiresUserInput>true</RequiresUserInput> 178 | </SynchronousCommand> 179 | <SynchronousCommand wcm:action="add"> 180 | <Order>2</Order> 181 | <Description>Run configuration scripts</Description> 182 | <CommandLine>cmd.exe /c powershell -File F:\OEM\main.ps1</CommandLine> 183 | <RequiresUserInput>true</RequiresUserInput> 184 | </SynchronousCommand> 185 | </FirstLogonCommands> 186 | <OOBE> 187 | <HideEULAPage>true</HideEULAPage> 188 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 189 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 190 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 191 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 192 | <NetworkLocation>Other</NetworkLocation> 193 | <ProtectYourPC>1</ProtectYourPC> 194 | </OOBE> 195 | <RegisteredOwner/> 196 | </component> 197 | </settings> 198 | 199 | <settings pass="offlineServicing"> 200 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 201 | <EnableLUA>false</EnableLUA> 202 | </component> 203 | </settings> 204 | 205 | </unattend> 206 | -------------------------------------------------------------------------------- /unattend/2025/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> 3 | <settings pass="windowsPE"> 4 | <component language="neutral" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 5 | <SetupUILanguage> 6 | <UILanguage>en-US</UILanguage> 7 | </SetupUILanguage> 8 | <InputLocale>en-US</InputLocale> 9 | <SystemLocale>en-US</SystemLocale> 10 | <UILanguage>en-US</UILanguage> 11 | <UILanguageFallback>en-US</UILanguageFallback> 12 | <UserLocale>en-US</UserLocale> 13 | </component> 14 | 15 | <component language="neutral" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 16 | <DriverPaths> 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="1"> 18 | <Path>E:\viostor\2k22\amd64</Path> 19 | </PathAndCredentials> 20 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 21 | <Path>E:\NetKVM\2k22\amd64</Path> 22 | </PathAndCredentials> 23 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 24 | <Path>E:\vioscsi\2k22\amd64</Path> 25 | </PathAndCredentials> 26 | </DriverPaths> 27 | </component> 28 | 29 | <component name="Microsoft-Windows-Setup" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 30 | <DiskConfiguration> 31 | <Disk wcm:action="add"> 32 | <DiskID>0</DiskID> 33 | <WillWipeDisk>true</WillWipeDisk> 34 | <CreatePartitions> 35 | <CreatePartition wcm:action="add"> 36 | <Order>1</Order> 37 | <Type>EFI</Type> 38 | <Size>100</Size> 39 | </CreatePartition> 40 | <CreatePartition wcm:action="add"> 41 | <Order>2</Order> 42 | <Type>MSR</Type> 43 | <Size>16</Size> 44 | </CreatePartition> 45 | <CreatePartition wcm:action="add"> 46 | <Order>3</Order> 47 | <Type>Primary</Type> 48 | <Extend>true</Extend> 49 | </CreatePartition> 50 | </CreatePartitions> 51 | <ModifyPartitions> 52 | <ModifyPartition wcm:action="add"> 53 | <Order>1</Order> 54 | <PartitionID>1</PartitionID> 55 | <Format>FAT32</Format> 56 | <Label>System</Label> 57 | </ModifyPartition> 58 | <ModifyPartition wcm:action="add"> 59 | <Order>2</Order> 60 | <PartitionID>2</PartitionID> 61 | </ModifyPartition> 62 | <ModifyPartition wcm:action="add"> 63 | <Order>3</Order> 64 | <PartitionID>3</PartitionID> 65 | <Label>WINDOWS</Label> 66 | <Format>NTFS</Format> 67 | <Letter>C</Letter> 68 | </ModifyPartition> 69 | </ModifyPartitions> 70 | </Disk> 71 | </DiskConfiguration> 72 | <ImageInstall> 73 | <OSImage> 74 | <InstallFrom> 75 | <MetaData wcm:action="add"> 76 | <!-- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-imageinstall-dataimage-installfrom-metadata-key --> 77 | <!-- wiminfo sources/install.wim --> 78 | <Key>/IMAGE/NAME</Key> 79 | <Value>Windows Server 2025 SERVERSTANDARD</Value> 80 | </MetaData> 81 | </InstallFrom> 82 | <InstallTo> 83 | <DiskID>0</DiskID> 84 | <PartitionID>3</PartitionID> 85 | </InstallTo> 86 | <WillShowUI>OnError</WillShowUI> 87 | <InstallToAvailablePartition>false</InstallToAvailablePartition> 88 | </OSImage> 89 | </ImageInstall> 90 | <DynamicUpdate> 91 | <!-- https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-dynamicupdate --> 92 | <Enable>true</Enable> 93 | <WillShowUI>Never</WillShowUI> 94 | </DynamicUpdate> 95 | <UpgradeData> 96 | <Upgrade>false</Upgrade> 97 | <WillShowUI>Never</WillShowUI> 98 | </UpgradeData> 99 | <UserData> 100 | <!-- https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys --> 101 | <ProductKey> 102 | <!--<Key>WX4NM-KYWYW-QJJR4-XV3QB-6VM33</Key>--> 103 | <WillShowUI>OnError</WillShowUI> 104 | </ProductKey> 105 | <AcceptEula>true</AcceptEula> 106 | <FullName>Vagrant</FullName> 107 | <Organization>Vagrant</Organization> 108 | </UserData> 109 | <Diagnostics> 110 | <!-- https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-diagnostics-optin --> 111 | <OptIn>false</OptIn> 112 | </Diagnostics> 113 | </component> 114 | </settings> 115 | 116 | <settings pass="specialize"> 117 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 118 | <OEMInformation> 119 | <HelpCustomized>false</HelpCustomized> 120 | </OEMInformation> 121 | <TimeZone>UTC</TimeZone> 122 | <RegisteredOwner/> 123 | </component> 124 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 125 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 126 | </component> 127 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 128 | <IEHardenAdmin>false</IEHardenAdmin> 129 | <IEHardenUser>false</IEHardenUser> 130 | </component> 131 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 132 | <SearchScopes> 133 | <Scope wcm:action="add"> 134 | <ScopeDefault>true</ScopeDefault> 135 | <ScopeDisplayName>Google</ScopeDisplayName> 136 | <ScopeKey>Google</ScopeKey> 137 | <ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl> 138 | </Scope> 139 | </SearchScopes> 140 | <DisableAccelerators>true</DisableAccelerators> 141 | <DisableFirstRunWizard>true</DisableFirstRunWizard> 142 | <Home_Page>about:blank</Home_Page> 143 | </component> 144 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 145 | <fDenyTSConnections>false</fDenyTSConnections> 146 | </component> 147 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 148 | <UserAuthentication>0</UserAuthentication> 149 | </component> 150 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 151 | <FirewallGroups> 152 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 153 | <Active>true</Active> 154 | <Group>Remote Desktop</Group> 155 | <Profile>all</Profile> 156 | </FirewallGroup> 157 | </FirewallGroups> 158 | </component> 159 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 160 | <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> 161 | </component> 162 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 163 | <SkipAutoActivation>true</SkipAutoActivation> 164 | </component> 165 | </settings> 166 | 167 | <settings pass="oobeSystem"> 168 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 169 | <UserAccounts> 170 | <AdministratorPassword> 171 | <Value>vagrant</Value> 172 | <PlainText>true</PlainText> 173 | </AdministratorPassword> 174 | </UserAccounts> 175 | <AutoLogon> 176 | <Password> 177 | <Value>vagrant</Value> 178 | <PlainText>true</PlainText> 179 | </Password> 180 | <Enabled>true</Enabled> 181 | <Username>administrator</Username> 182 | </AutoLogon> 183 | <FirstLogonCommands> 184 | <SynchronousCommand wcm:action="add"> 185 | <Order>1</Order> 186 | <Description>Set Execution Policy 64 Bit</Description> 187 | <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> 188 | <RequiresUserInput>true</RequiresUserInput> 189 | </SynchronousCommand> 190 | <SynchronousCommand wcm:action="add"> 191 | <Order>2</Order> 192 | <Description>Run configuration script</Description> 193 | <CommandLine>cmd.exe /c powershell -File F:\OEM\main.ps1</CommandLine> 194 | <RequiresUserInput>true</RequiresUserInput> 195 | </SynchronousCommand> 196 | </FirstLogonCommands> 197 | <OOBE> 198 | <HideEULAPage>true</HideEULAPage> 199 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 200 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 201 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 202 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 203 | <NetworkLocation>Other</NetworkLocation> 204 | <ProtectYourPC>1</ProtectYourPC> 205 | </OOBE> 206 | <RegisteredOwner/> 207 | </component> 208 | </settings> 209 | 210 | <settings pass="offlineServicing"> 211 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS"> 212 | <EnableLUA>false</EnableLUA> 213 | </component> 214 | </settings> 215 | 216 | </unattend> 217 | -------------------------------------------------------------------------------- /urls.txt: -------------------------------------------------------------------------------- 1 | 11e https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1742.240906-0331.ge_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 2 | 10e https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66750/19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 3 | 10e-21h2 https://software-static.download.prss.microsoft.com/pr/download/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 4 | 10e-20h2 https://software-static.download.prss.microsoft.com/pr/download/19042.631.201119-0144.20h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso 5 | 2008 https://archive.org/download/en_windows_server_2008_r2_with_sp1_x64_dvd_617601_202006/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso 6 | 2012 http://care.dlservice.microsoft.com/dl/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 7 | 2016 https://software-static.download.prss.microsoft.com/pr/download/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO 8 | 2019 https://software-static.download.prss.microsoft.com/pr/download/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso 9 | 2022 https://software-static.download.prss.microsoft.com/sg/download/20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso 10 | 2025 https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_SERVER_EVAL_x64FRE_en-us.iso 11 | --------------------------------------------------------------------------------