帳戶: 封鎖 Microsoft 帳戶 的登錄值 NoConnectedUser電腦HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System
登錄
NoConnectedUser
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- 帳戶: 封鎖 Microsoft 帳戶
| 項目 | 儲存的值 |
|---|---|
| 此原則已停用 | 0 |
| 使用者無法新增 Microsoft 帳戶 | 1 |
| 使用者無法新增 Microsoft 帳戶或以 Microsoft 帳戶登入 | 3 |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System] ; 選項 (只使用其中一個) ; 此原則已停用 "NoConnectedUser"=dword:00000000 ; 使用者無法新增 Microsoft 帳戶 "NoConnectedUser"=dword:00000001 ; 使用者無法新增 Microsoft 帳戶或以 Microsoft 帳戶登入 "NoConnectedUser"=dword:00000003
CMD
:: 選項 (只使用其中一個) :: 此原則已停用 reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoConnectedUser" /t REG_DWORD /d 0 /f :: 使用者無法新增 Microsoft 帳戶 reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoConnectedUser" /t REG_DWORD /d 1 /f :: 使用者無法新增 Microsoft 帳戶或以 Microsoft 帳戶登入 reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoConnectedUser" /t REG_DWORD /d 3 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null # 選項 (只使用其中一個) # 此原則已停用 New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'NoConnectedUser' -PropertyType DWord -Value 0 -Force | Out-Null # 使用者無法新增 Microsoft 帳戶 New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'NoConnectedUser' -PropertyType DWord -Value 1 -Force | Out-Null # 使用者無法新增 Microsoft 帳戶或以 Microsoft 帳戶登入 New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'NoConnectedUser' -PropertyType DWord -Value 3 -Force | Out-Null