共用方式為


Msvm_CollectionManagementService 類別的 DefineCollection 方法

建立新的 CIM_CollectionOfMSEs 物件。

語法

uint32 DefineCollection(
  [in]  string                   Name,
  [in]  string                   Id,
  [in]  uint16                   Type,
  [out] CIM_CollectionOfMSEs REF DefinedCollection,
  [out] CIM_ConcreteJob      REF Job
);

參數

名稱 [in]

新集合的名稱。

識別碼 [in]

新集合的識別碼。

輸入 [in]

新集合的類型。

虛擬系統 集合 (0)

集合 集合 (1)

DefinedCollection [out]

定義集合的物件參考。

作業 [out]

如果工作完成) ,則作業 (的參考可以是 null。

傳回值

如果成功,則會傳回 0 或 4096 (作業啟動) ;否則,會傳回錯誤。

已完成,沒有錯誤 (0)

已檢查方法參數 - 作業啟動 (4096)

失敗 (32768)

拒絕存取 (32769)

不支援 (32770)

狀態未知 , (32771)

時 (32772)

不正確參數 (32773)

系統正在使用 中 (32774)

此作業的狀態無效 , (32775)

不正確的資料類型 (32776)

( 32777) 無法使用系統

記憶體不足 (32778)

找不到 檔案 (32779)

規格需求

需求
最低支援的用戶端
Windows 10 [僅限傳統型應用程式]
最低支援的伺服器
Windows Server 2016
命名空間
Root\virtualization\v2
MOF
WindowsVirtualization.V2.mof
DLL
Vmms.exe

另請參閱

Msvm_CollectionManagementService