Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Kr328/9251f1bc7e21981fa596986919544457 to your computer and use it in GitHub Desktop.
Save Kr328/9251f1bc7e21981fa596986919544457 to your computer and use it in GitHub Desktop.
Sync systemd boot next boot with current entry (Windows).
Import-Module UEFIv2
$NAMESPACE = "{4a67b082-0a4c-41cf-b6c7-440b29bb8c4f}"
$lastBootEntry = Get-UEFIVariable -VariableName "LoaderEntrySelected" -Namespace $NAMESPACE -AsByteArray
Set-UEFIVariable -VariableName "LoaderEntryOneShot" -Namespace $NAMESPACE -ByteArray $lastBootEntry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment