Watch Demo×
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

How to Enable Windows Fast Startup with PowerShell

Fast Boot, known by other names such as Hiberboot or Fast Startup, is a feature within Windows designed to reduce boot-up times after a shutdown. Its integration has transformed the way Windows systems resume their operation, a crucial performance element for both personal users and IT professionals.

Background

With the advancements in Windows OS, especially from Windows 10 and Windows Server 2016 onwards, the operating system brought forth several features aiming at boosting performance and user experience. One such feature is the Windows Fast Boot. For Managed Service Providers (MSPs) and IT professionals, minimizing boot times translates to quicker workstation readiness, resulting in better productivity and user satisfaction. Thus, ensuring that Fast Boot is enabled can be of paramount importance.

Enable Fast Startup with PowerShell Script

<#
.SYNOPSIS
    Enable Windows Fast Boot, also known as Hiberboot or Fast Startup.
.DESCRIPTION
    Enable Windows Fast Boot, also known as Hiberboot or Fast Startup.
    Note this does enable the option to hibernate.
.EXAMPLE
    No parameter needed.
    Enables Windows Fast Boot
.OUTPUTS
    None
.NOTES
    Minimum OS Architecture Supported: Windows 10, Windows Server 2016
    Release Notes:
    Initial Release
    (c) 2023 NinjaOne
    By using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at https://www.ninjaone.com/terms-of-use.
    Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. 
    Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. 
    Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. 
    Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. 
    Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. 
    Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. 
    EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).
#>
[CmdletBinding()]
param ()

begin {
    function Test-IsElevated {
        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
        $p = New-Object System.Security.Principal.WindowsPrincipal($id)
        $p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
    }
}
process {
    if (-not (Test-IsElevated)) {
        Write-Error -Message "Access Denied. Please run with Administrator privileges."
        exit 1
    }

    $Path = "HKLM:SystemCurrentControlSetControlPower"
    $Name = "HibernateEnabled"
    $Value = "1"

    try {
        # This path should always be there, if not then something is badly wrong.
        New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType DWord -Force | Out-Null
    }
    catch {
        Write-Error $_
        Write-Host "Failed to enable hibernation."
        exit 1
    }

    $Path = "HKLM:SYSTEMCurrentControlSetControlSession ManagerPower"
    $Name = "HiberbootEnabled"
    $Value = "1"

    try {
        if (-not $(Test-Path $Path)) {
            New-Item -Path $Path -Force | Out-Null
            New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType DWord -Force | Out-Null
        }
        else {
            New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType DWord -Force | Out-Null
        }
    }
    catch {
        Write-Error $_
        Write-Host "Failed to enable Fast Boot."
        exit 1
    }
    exit 0
}
end {}

 

Access 300+ scripts in the NinjaOne Dojo

Get Access

Detailed Breakdown of the Script

The script begins by providing a description of its function, supported OS, and notes about its usage.

  • Preparation Phase (begin): The script initiates with a function Test-IsElevated designed to check if the current user has administrative privileges. This is crucial as making changes to system settings typically requires elevated permissions.
  • Execution Phase (process):
    a. The script checks if it’s being run with administrator privileges using the Test-IsElevated function. If not, it outputs an error message.
    b. It then tries to enable hibernation by modifying a registry key (HibernateEnabled) in the Power path.
    c. Following this, it attempts to enable Fast Boot by setting the HiberbootEnabled key in the Session ManagerPower path. If the path doesn’t exist, it creates it.
  • Conclusion Phase (end): This is left empty, but it could be populated with any cleanup or finalizing tasks if needed in the future.

Potential Use Cases

Imagine an IT professional, Carol, who is in charge of setting up and managing a new office’s workstations. To ensure that employees don’t waste time waiting for systems to boot up each morning, Carol uses this script to enable Fast Boot on all machines, enhancing productivity across the board.

FAQs

Q: Is this script compatible with all versions of Windows?
A: No, it supports Windows 10 and Windows Server 2016 onwards.

Q: What if I already have the Fast Boot enabled?
A: The script uses the -Force parameter, ensuring the value is set without errors even if it exists.

Implications

By modifying system registries, this script can potentially affect the way systems boot. Incorrect application can lead to boot issues. Furthermore, while Fast Boot improves startup times, it might cause problems with certain system updates or dual-boot configurations. IT security isn’t directly impacted, but ensuring a system boots up correctly is paramount for operational readiness.

How to Enable Fast Startup Manually

If you prefer not to use a PowerShell script, you can enable this feature manually by following these steps:

  1. Open Control Panel:
    • Press `Windows + R` on your keyboard to open the Run dialog box.
    • Type `control panel` and press `Enter` or click `OK`.
  2. View by Category:
    • In the Control Panel, ensure that the view is set to “Category”. If not, click on the drop-down menu in the top-right corner and select “Category”.
  3. Go to Power Options:
    • Click on “System and Security”.
    • Then, click on “Power Options”.
  4. Choose what the power buttons do:
    • On the left-hand side of the Power Options window, click on the link that says “Choose what the power buttons do”.
  5. Change settings that are currently unavailable:
    • At the top of the next window, you might see a section that’s grayed out. To make changes, click on the link that says “Change settings that are currently unavailable”.
  6. Enable Fast Startup:
    • Scroll down to the “Shutdown settings” section.
    • Check the box next to “Turn on fast startup (recommended)”.
    • If you don’t see this option, it might be because hibernation is not enabled on your system. You’ll need to enable hibernation first to see this option.
  7. Save Changes:
    • Click on the “Save changes” button at the bottom of the window.
  8. Restart your computer:
    • For the changes to take effect, it’s a good idea to restart your computer.

 Recommendations and Final Thoughts

  • Always backup your registry before making changes.
  • Ensure that the script is run with administrative privileges.
  • After applying the script, test the system’s boot time and verify if Fast Boot is enabled.

For IT professionals or those using an IT management platform like NinjaOne, the ability to control and optimize system behavior, such as enabling Windows Fast Boot, is critical. NinjaOne can further complement such scripts, allowing IT managers to deploy them across various systems, ensuring peak system performance and optimal user experience

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about NinjaOne Remote Script Deployment, check out a live tour, or start your free trial of the NinjaOne platform.

Categories:

You might also like

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).