Skip to content

Update sac-enabler.ps1 to v1.3#126

Open
anmocanu wants to merge 1 commit into
Azure:mainfrom
anmocanu:patch-6
Open

Update sac-enabler.ps1 to v1.3#126
anmocanu wants to merge 1 commit into
Azure:mainfrom
anmocanu:patch-6

Conversation

@anmocanu

Copy link
Copy Markdown
Contributor

This script enables Special Administration Console (SAC) and Serial Console boot settings on an attached OS disk's BCD store. It includes enhanced logic for Gen2 disks and improved error handling.
.VERSION
v1.3: [May 2026] - Updated the script again (current)
- Fixed breaking exception when the Hyper-V module is not installed on the host.
- Added explicit checking via Get-Module before executing nested VM discovery.
v1.2: [May 2026] - Updated the script
- Included advanced Gen2 unlettered EFI fallback and dynamic drive-letter assignment.
v0.1: Initial commit. This was the version 1.0 of the script

This script enables Special Administration Console (SAC) and Serial Console boot settings on an attached OS disk's BCD store. It includes enhanced logic for Gen2 disks and improved error handling.
    .VERSION
    v1.3: [May 2026] - Updated the script again (current)
                       - Fixed breaking exception when the Hyper-V module is not installed on the host.
                       - Added explicit checking via Get-Module before executing nested VM discovery.
    v1.2: [May 2026] - Updated the script
                       - Included advanced Gen2 unlettered EFI fallback and dynamic drive-letter assignment.
    v0.1: Initial commit. This was the version 1.0 of the script
@EdwinBernal1 EdwinBernal1 self-requested a review June 16, 2026 13:58
@EdwinBernal1

EdwinBernal1 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Issues Found

🟡 Potential compatibility gap: only checks winload.exe for OS detection

The script sets $isOsPath via \windows\system32\winload.exe only. Some UEFI-oriented scenarios rely on winload.efi path detection. If winload.exe is absent or not suitable in edge images, OS detection may fail even if the disk is valid.

Recommendation: mirror the pattern used in PR #130 and check both winload.exe and winload.efi.

🟢 Minor: fallback failure path could be clearer

If no default boot entry is parsed from displayorder, the script exits with generic failure state. Add explicit warning when $defaultLine/GUID extraction fails for easier troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants