WindowsLicensing CSP

Windows 測試人員的標誌。

重要

此 CSP 包含一些正在開發且僅適用于 Windows Insider Preview 組建 的設定。 這些設定可能會變更,而且可能相依于預覽中的其他功能或服務。

WindowsLicensing 設定服務提供者是專為授權相關管理案例所設計。

下列清單顯示 WindowsLicensing 設定服務提供者節點:

ChangeProductKey

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1703 [10.0.15063] 和更新版本
./Vendor/MSFT/WindowsLicensing/ChangeProductKey

安裝 Windows 10 桌面裝置的產品金鑰。 不會重新啟動。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 Exec

CheckApplicability

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/CheckApplicability

如果輸入的產品金鑰可用於 Windows 10 桌面裝置的版本升級,則會傳回 TRUE。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 Exec

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Exec>
    <CmdID>$CmdID$</CmdID>
    <Item>
      <Target>
        <LocURI>./Device/Vendor/MSFT/WindowsLicensing/CheckApplicability</LocURI>
      </Target>
      <Meta>
        <Format xmlns="syncml:metinf">chr</Format>
      </Meta>
      <Data>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Data>
    </Item>
   </Exec>
   <Final/>
  </SyncBody>
</SyncML>

注意

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX 在 [數據] 標籤中,應該以您的產品金鑰取代。

DeviceLicensingService

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 11 版本 21H2 [10.0.22000.1165] 和更新版本
✅Windows 11 版本 22H2 [10.0.22621] 和更新版本
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService

裝置型訂用帳戶。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]

DeviceLicensingService/DeviceLicensingLastError

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 11 版本 21H2 [10.0.22000.1165] 和更新版本
✅Windows 11 版本 22H2 [10.0.22621] 和更新版本
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingLastError

傳回重新整理/移除裝置授權作業的最後一個錯誤碼。 值會是空 (0) ,而不會發生錯誤。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

DeviceLicensingService/DeviceLicensingLastErrorDescription

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 11 版本 21H2 [10.0.22000.1165] 和更新版本
✅Windows 11 版本 22H2 [10.0.22621] 和更新版本
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingLastErrorDescription

從裝置授權傳回最後一個錯誤描述。 如果無法評估錯誤解密,則值會是空的。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

DeviceLicensingService/DeviceLicensingStatus

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 11 版本 21H2 [10.0.22000.1165] 和更新版本
✅Windows 11 版本 22H2 [10.0.22621] 和更新版本
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingStatus

傳回重新整理/移除裝置授權作業的狀態。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

DeviceLicensingService/LicenseType

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 11 版本 21H2 [10.0.22000.1165] 和更新版本
✅Windows 11 版本 22H2 [10.0.22621] 和更新版本
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/LicenseType

授權類型:以用戶為基礎的訂用帳戶或裝置型訂用帳戶。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 取得、取代

允許的值:

說明
0 以用戶為基礎的訂用帳戶。
1 裝置型訂用帳戶。

版本

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/Edition

傳回值,該值會對應至在桌面或行動裝置上執行的 Windows 10 版。 取得值,將其轉換成其十六進位對等專案,然後搜尋 MSDN 上的 GetProductInfo 函式頁面以取得版本資訊。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Get>
      <CmdID>$CmdID$</CmdID>
        <Item>
          <Target>
            <LocURI>./Device/Vendor/MSFT/WindowsLicensing/Edition</LocURI>
          </Target>
        </Item>
    </Get>
    <Final/>
  </SyncBody>
</SyncML>

LicenseKeyType

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/LicenseKeyType

傳回 Windows 10 裝置用於版本升級的參數類型。 Windows 10 桌面裝置需要產品金鑰以進行版本升級。 Windows 10 行動裝置需要版本升級的授權。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Get>
      <CmdID>$CmdID$</CmdID>
        <Item>
          <Target>
            <LocURI>./Device/Vendor/MSFT/WindowsLicensing/LicenseKeyType</LocURI>
          </Target>
        </Item>
    </Get>
    <Final/>
  </SyncBody>
</SyncML>

SMode

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1809 [10.0.17763] 和更新版本
./Vendor/MSFT/WindowsLicensing/SMode

用於管理 S 模式的內部節點。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]

SMode/Status

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1809 [10.0.17763] 和更新版本
./Vendor/MSFT/WindowsLicensing/SMode/Status

傳回最新的 SwitchFromSMode 或 SwitchPolicy 集要求的狀態。

可能的值:

  • 要求失敗,錯誤碼為 404:未提出 SwitchFromSMode 要求。
  • 0:裝置已成功切換出S模式。
  • 1:裝置正在處理切換出S模式的要求。
  • 3:裝置已切換出S模式。
  • 4:裝置無法切換出S模式。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Get>
      <CmdID>6</CmdID>
      <Item>
        <Target>
          <LocURI>
            ./Vendor/MSFT/WindowsLicensing/SMode/Status
          </LocURI>
        </Target>
      </Item>
    </Get>
    <Final/>
  </SyncBody>
</SyncML>

SMode/SwitchFromSMode

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1809 [10.0.17763] 和更新版本
./Vendor/MSFT/WindowsLicensing/SMode/SwitchFromSMode

盡可能將裝置切換出S模式。 不會重新啟動。

描述架構屬性:

屬性名稱 屬性值
格式 null
存取類型 Exec

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Exec>
      <CmdID>5</CmdID>
      <Item>
        <Target>
          <LocURI>
            ./Vendor/MSFT/WindowsLicensing/SMode/SwitchFromSMode
          </LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">null</Format>
          <Type>text/plain</Type>
        </Meta>
        <Data></Data>
      </Item>
    </Exec>
    <Final/>
  </SyncBody>
</SyncML>

SMode/SwitchingPolicy

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1809 [10.0.17763] 和更新版本
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy

決定取用者是否可以將裝置切換出S模式的原則。

此設定僅適用於 S 模式中可用的裝置。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 新增、刪除、取得、取代

允許的值:

說明
0 無限制:允許使用者將裝置切換出S模式。
1 用戶封鎖:系統管理員已封鎖使用者將其裝置切換出S模式。 只有系統管理員可以透過 SMode/SwitchFromSMode 節點將裝置切換出 S 模式。

範例

  • 新增 S 模式切換原則

    <SyncML xmlns="SYNCML:SYNCML1.2">
      <SyncBody>
        <Add>
          <CmdID>4</CmdID>
          <Item>
            <Target>
              <LocURI>
                ./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
              </LocURI>
            </Target>
            <Meta>
              <Format xmlns="syncml:metinf">int</Format>
              <Type>text/plain</Type>
            </Meta>
            <Data>1</Data>
          </Item>
        </Add>
        <Final/>
      </SyncBody>
    </SyncML>
    
  • 取得 S 模式切換原則

    <SyncML xmlns="SYNCML:SYNCML1.2">
      <SyncBody>
        <Get>
          <CmdID>2</CmdID>
          <Item>
            <Target>
              <LocURI>
                ./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
              </LocURI>
            </Target>
          </Item>
        </Get>
        <Final/>
      </SyncBody>
    </SyncML>
    
  • 取代 S 模式 SwitchingPolicy

    <SyncML xmlns="SYNCML:SYNCML1.2">
      <SyncBody>
        <Replace>
          <CmdID>1</CmdID>
          <Item>
            <Target>
              <LocURI>
                ./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
              </LocURI>
            </Target>
            <Meta>
              <Format xmlns="syncml:metinf">int</Format>
              <Type>text/plain</Type>
            </Meta>
            <Data>1</Data>
          </Item>
        </Replace>
        <Final/>
      </SyncBody>
    </SyncML>
    
  • 刪除 S 模式 SwitchingPolicy

    <SyncML xmlns="SYNCML:SYNCML1.2">
      <SyncBody>
        <Delete>
          <CmdID>3</CmdID>
          <Item>
            <Target>
              <LocURI>
                ./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
              </LocURI>
            </Target>
          </Item>
        </Delete>
        <Final/>
      </SyncBody>
    </SyncML>
    

狀態

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/Status

傳回 Windows 10 桌面和行動裝置上的版本升級狀態。 狀態:0 = 失敗,1 = 擱置,2 = 進行中,3 = 已完成,4 = 未知。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Get>
      <CmdID>$CmdID$</CmdID>
        <Item>
          <Target>
            <LocURI>./Device/Vendor/MSFT/WindowsLicensing/Status</LocURI>
          </Target>
        </Item>
    </Get>
    <Final/>
  </SyncBody>
</SyncML>

訂閱

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Vendor/MSFT/WindowsLicensing/Subscriptions

訂用帳戶的節點。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]

Subscriptions/{SubscriptionId}

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}

訂用帳戶標識碼的節點。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]
動態節點命名 ClientInventory

Subscriptions/{SubscriptionId}/Name

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}/Name

傳回訂用帳戶的名稱。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Subscriptions/{SubscriptionId}/Status

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}/Status

傳回訂閱的狀態。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

Subscriptions/DisableSubscription

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/DisableSubscription

停用或啟用裝置上的訂用帳戶啟用。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 替換

允許的值:

說明
0 啟用訂用帳戶。
1 停用訂用帳戶。 它也會移除裝置上任何現有的訂用帳戶。

Subscriptions/RemoveSubscription

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/RemoveSubscription

拿掉訂閱卸載訂閱授權。 它也會將訂用帳戶類型重設為使用者型訂用帳戶。

描述架構屬性:

屬性名稱 屬性值
格式 null
存取類型 Exec

Subscriptions/SubscriptionLastError

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionLastError

上次訂閱作業的錯誤碼。 值會是空 (0) ,而不會發生錯誤。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

Subscriptions/SubscriptionLastErrorDescription

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionLastErrorDescription

上次訂閱作業的錯誤描述。 如果無法評估錯誤描述,則值會是空的。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Subscriptions/SubscriptionStatus

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionStatus

上次訂閱作業的狀態。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

Subscriptions/SubscriptionType

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows Insider Preview
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionType

將裝置設定為裝置型訂用帳戶或使用者型訂用帳戶。 針對裝置型訂用帳戶,此動作會自動取得裝置上的訂用帳戶。 針對使用者型訂用帳戶,需要使用者登入的現有程式。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 取得、取代

允許的值:

說明
0 以用戶為基礎的訂用帳戶。
1 裝置型訂用帳戶。

UpgradeEditionWithLicense

注意

此原則已被取代,並可能在未來的版本中移除。

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/UpgradeEditionWithLicense

提供 Windows 10 行動裝置版本升級的授權。 不需要重新啟動。

描述架構屬性:

屬性名稱 屬性值
格式 xml
存取類型 Exec

UpgradeEditionWithProductKey

領域 版本 適用的作業系統
✅ 裝置
❌ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
❌ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Vendor/MSFT/WindowsLicensing/UpgradeEditionWithProductKey

輸入版本升級 Windows 10 桌面裝置的產品金鑰。 需要重新啟動。

當產品金鑰從 MDM 伺服器推送至使用者的裝置時, changepk.exe 請使用產品密鑰執行。 完成之後,會向用戶顯示新版 Windows 可用的通知。 用戶接著可以手動或在兩小時後重新啟動其系統,裝置會自動重新啟動以完成升級。 使用者會在自動重新啟動前10分鐘收到提醒通知。

裝置重新啟動之後,版本升級程序便完成。 使用者將會收到成功升級的通知。

注意

如果另一個原則需要在執行 時 changepk.exe 進行系統重新啟動,則版本升級將會失敗。

如果在佈建套件中輸入產品金鑰,而且使用者開始安裝套件,會向使用者顯示通知,告知他們的系統會重新啟動才能完成套件安裝。 當使用者明確同意繼續時,套件會繼續安裝,並 changepk.exe 使用產品密鑰執行。 自動重新開機之前使用者將會收到提醒通知 30 秒。

裝置重新啟動之後,版本升級程序便完成。 使用者將會收到成功升級的通知。

此節點也可以藉由輸入產品密鑰,在特定版本的 Windows 10 桌面裝置上用來啟用或變更產品密鑰。 啟用或變更產品金鑰不需要重新啟動,也是使用者的無訊息程式。

重要

輸入的產品金鑰必須是 29 個字元 (也就是說,它應該包含連字元) ,否則 Windows 10 桌面裝置上的啟用、版本升級或產品密鑰變更將會失敗。 產品金鑰是從 Microsoft 大量授權服務中心取得。 您的組織必須與 Microsoft 簽訂大量授權合約,才能存取入口網站。

下列是透過 MDM 使用此節點時的有效版本升級路徑:

  • Windows 10/11 企業版至 Windows 10/11 教育版
  • Windows 10/11 Windows 10/11 教育版首頁
  • Windows 10/11 專業版至 Windows 10/11 教育版
  • Windows 10/11 專業版至 Windows 10/11 企業版

開啟或變更產品金鑰可以在下列版本上執行:

  • Windows 10/11 教育版
  • Windows 10/11 企業版
  • Windows 10/11 首頁
  • Windows 10/11 專業版

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 Exec
重新啟動行為 Automatic

範例

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Exec>
    <CmdID>$CmdID$</CmdID>
    <Item>
      <Target>
        <LocURI>./Device/Vendor/MSFT/WindowsLicensing/UpgradeEditionWithProductKey</LocURI>
      </Target>
      <Meta>
        <Format xmlns="syncml:metinf">chr</Format>
      </Meta>
      <Data>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Data>
    </Item>
   </Exec>
   <Final/>
  </SyncBody>
</SyncML>

注意

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX 在 [數據] 標籤中,應該以您的產品金鑰取代。

設定服務提供者參考