Enable Windows 10 Developer Mode programmatically

前端 未结 2 1046
不知归路
不知归路 2020-12-30 04:23

I know you can enable Windows 10 Developer mode interactively by going to Settings | For developers, selecting \'Developer mode\' and then rebooting.

Is there a way

2条回答
  •  梦谈多话
    2020-12-30 04:43

    Turns out Nickolaj Andersen has written an article which includes just such a PowerShell script..

    http://www.scconfigmgr.com/2016/09/11/enable-ubuntu-in-windows-10-during-osd-with-configmgr/

    Here are the relevant lines extracted from his post:

    # Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode
    $RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
    if (-not(Test-Path -Path $RegistryKeyPath)) {
        New-Item -Path $RegistryKeyPath -ItemType Directory -Force
    }
    
    # Add registry value to enable Developer Mode
    New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1
    

提交回复
热议问题