Make VirtIO and automatic logon opt-in in the Windows 11 configure script
Add -InstallVirtIO and -EnableAutomaticLogon switches to Configure-Windows.ps1 so it can run standalone on a physical machine. Autounattend.xml passes both switches during the virtual machine install. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1691062554
commit
96c689b03e
2 files changed
+12
-3
No files matched your search
@@ -1,3 +1,8 @@
|
||||
param(
|
||||
[switch]$InstallVirtIO,
|
||||
[switch]$EnableAutomaticLogon
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
@@ -91,7 +96,11 @@ function Enable-AutomaticLogon {
|
||||
Remove-ItemProperty -Path $winlogonPath -Name 'AutoLogonCount' -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
Install-VirtIOGuestTools
|
||||
if ($InstallVirtIO) {
|
||||
Install-VirtIOGuestTools
|
||||
}
|
||||
Install-OpenSSHServer
|
||||
Install-AdministratorAuthorizedKey
|
||||
Enable-AutomaticLogon
|
||||
if ($EnableAutomaticLogon) {
|
||||
Enable-AutomaticLogon
|
||||
}
|
||||
Reference in new issue
Block a user