本文介绍了以编程方式启用 Windows 10 开发人员模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以以交互方式启用 Windows 10 开发人员模式,方法是转到设置 |对于开发者,选择开发者模式"然后重启.

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

有没有办法以编程方式启用此功能?(例如,通过 PowerShell 或类似工具,以便我可以在刷新我的开发人员工作站时将其作为 Boxstarter 脚本中的一个步骤包含在内)

Is there a way to enable this programmatically? (eg. via PowerShell or similar so that I can include it as a step in a Boxstarter script when refreshing my developer workstation)

推荐答案

原来 Nickolaj Andersen 写了一篇文章,其中包含这样的 PowerShell 脚本..

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

这篇关于以编程方式启用 Windows 10 开发人员模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 08:23