powershell - 从 Windows 10 powershell 设置 "sideload apps"(更新和安全 > 对于开发人员)

标签 powershell windows-store-apps windows-10 updates sideloading

是否可以从 Windows 10 Anniversary 上的 powershell 脚本(只是简单的“旧”Win10)设置“更新和安全>面向开发人员”属性“侧载应用程序”?

最佳答案

根据 https://msdn.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development#which-settings-should-i-choose-sideload-apps-or-developer-mode :

以管理员权限运行 PowerShell。
要启用旁加载,请运行以下命令:

PS C:\WINDOWS\system32> reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowAllTrustedApps" /d "1"

要启用开发人员模式,请运行以下命令:
PS C:\WINDOWS\system32> reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

关于powershell - 从 Windows 10 powershell 设置 "sideload apps"(更新和安全 > 对于开发人员),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40485823/

相关文章:

C# Powershell 脚本失败 : "failed to get zone information"

c# - Windows 8 Store 应用程序关闭时保存数据

winapi - Windows 10 上的 DwmExtendFrameIntoClientArea 奇怪行为

windows-10 - Windows 10 通用应用向后兼容

sql-server - Xp_CmdShell Powershell 脚本未找到有效模块

powershell - 第一次调用 msbuild 挂起

xml - 在PowerShell中使用msbuild在NuGet中的安装事件上编辑csproj

c# - Windows 应用商店应用程序自动导航到下一页失败

mvvm - 将导航服务注册到框架元素而不是页面 - WinRt Prism 2.0

firefox - 自动修改服务器响应