internal static ManagementObject GetDiscDriveResource(this ManagementScope scope, ManagementObject virtualSystemSettingData) { var storageAllocationSettingData = scope.GetAllocationSettingDataForSyntheticDiskDrives(); var ideController = virtualSystemSettingData.GetIdeController(); storageAllocationSettingData["Parent"] = ideController; storageAllocationSettingData["AddressOnParent"] = 0; var outParameters = scope.AddResourceSettings(virtualSystemSettingData, storageAllocationSettingData); var resultingRessourceSettings = outParameters["ResultingResourceSettings"] as string[]; return(new ManagementObject(resultingRessourceSettings[0])); }