feature: collect MDM Hardware Data (Autopilot hash) during device enrolment
resolves #160
This commit is contained in:
@@ -46,6 +46,7 @@ namespace Disco.Client.Interop
|
||||
audit.ApplyPhysicalMemoryInformation();
|
||||
audit.ApplyDiskDriveInformation();
|
||||
audit.ApplyBatteryInformation();
|
||||
audit.ApplyMobileDeviceManagementInformation();
|
||||
|
||||
audit.NetworkAdapters = Network.GetNetworkAdapters();
|
||||
|
||||
@@ -560,6 +561,18 @@ namespace Disco.Client.Interop
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyMobileDeviceManagementInformation(this DeviceHardware deviceHardware)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var wmiObject = new ManagementObject(@"\\.\ROOT\CIMV2\mdm\dmmap:MDM_DevDetail_Ext01.InstanceID=""Ext"",ParentID=""./DevDetail"""))
|
||||
{
|
||||
deviceHardware.MdmHardwareData = (string)wmiObject.GetPropertyValue("DeviceHardwareData");
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
private static string Description(this PCSystemTypes type)
|
||||
{
|
||||
switch (type)
|
||||
|
||||
Reference in New Issue
Block a user