Feature #3: Server SKU support for Enrolment
The Disco Client (which is launched by the Bootstrapper) supports Windows Server SKUs. Removes dependancy on WLANAPI.DLL. Updates to enrolment allows for successful addition to System Critial objects (eg. DC/PDCs) into Disco without making any changes to AD objects.
This commit is contained in:
@@ -481,7 +481,7 @@ namespace Disco.BI.DeviceBI
|
|||||||
response.DeviceDomainName = MachineInfo.Domain;
|
response.DeviceDomainName = MachineInfo.Domain;
|
||||||
|
|
||||||
// Enforce Computer Name Convention
|
// Enforce Computer Name Convention
|
||||||
if (RepoDevice.DeviceProfile.EnforceComputerNameConvention)
|
if (!MachineInfo.IsCriticalSystemObject && RepoDevice.DeviceProfile.EnforceComputerNameConvention)
|
||||||
{
|
{
|
||||||
var calculatedComputerName = RepoDevice.ComputerNameRender(Database);
|
var calculatedComputerName = RepoDevice.ComputerNameRender(Database);
|
||||||
if (!Request.DeviceComputerName.Equals(calculatedComputerName, StringComparison.InvariantCultureIgnoreCase))
|
if (!Request.DeviceComputerName.Equals(calculatedComputerName, StringComparison.InvariantCultureIgnoreCase))
|
||||||
@@ -499,7 +499,7 @@ namespace Disco.BI.DeviceBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Enforce Organisation Unit
|
// Enforce Organisation Unit
|
||||||
if (response.OfflineDomainJoin == null && RepoDevice.DeviceProfile.EnforceOrganisationalUnit)
|
if (!MachineInfo.IsCriticalSystemObject && response.OfflineDomainJoin == null && RepoDevice.DeviceProfile.EnforceOrganisationalUnit)
|
||||||
{
|
{
|
||||||
var parentDistinguishedName = MachineInfo.ParentDistinguishedName();
|
var parentDistinguishedName = MachineInfo.ParentDistinguishedName();
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ namespace Disco.BI.DeviceBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (MachineInfo != null)
|
if (MachineInfo != null && !MachineInfo.IsCriticalSystemObject)
|
||||||
{
|
{
|
||||||
EnrolmentLog.LogSessionProgress(sessionId, 75, "Updating Active Directory Computer Account Properties");
|
EnrolmentLog.LogSessionProgress(sessionId, 75, "Updating Active Directory Computer Account Properties");
|
||||||
MachineInfo.UpdateNetbootGUID(Request.DeviceUUID, Request.DeviceLanMacAddress);
|
MachineInfo.UpdateNetbootGUID(Request.DeviceUUID, Request.DeviceLanMacAddress);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ namespace Disco.BI.Extensions
|
|||||||
if (d.ComputerName != null)
|
if (d.ComputerName != null)
|
||||||
{
|
{
|
||||||
var adAccount = d.ActiveDirectoryAccount();
|
var adAccount = d.ActiveDirectoryAccount();
|
||||||
if (adAccount != null)
|
if (adAccount != null && !adAccount.IsCriticalSystemObject)
|
||||||
{
|
{
|
||||||
adAccount.DisableAccount();
|
adAccount.DisableAccount();
|
||||||
}
|
}
|
||||||
@@ -120,7 +120,7 @@ namespace Disco.BI.Extensions
|
|||||||
if (d.ComputerName != null)
|
if (d.ComputerName != null)
|
||||||
{
|
{
|
||||||
var adAccount = d.ActiveDirectoryAccount();
|
var adAccount = d.ActiveDirectoryAccount();
|
||||||
if (adAccount != null)
|
if (adAccount != null && !adAccount.IsCriticalSystemObject)
|
||||||
{
|
{
|
||||||
adAccount.EnableAccount();
|
adAccount.EnableAccount();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,15 @@ namespace Disco.Client.Interop
|
|||||||
if (NetworkAdapters.Count > 0)
|
if (NetworkAdapters.Count > 0)
|
||||||
{
|
{
|
||||||
// Only Retrieve Wlan Adapters if at least one adapter was found by WMI
|
// Only Retrieve Wlan Adapters if at least one adapter was found by WMI
|
||||||
RetrieveWlanAdapters();
|
try
|
||||||
|
{
|
||||||
|
RetrieveWlanAdapters();
|
||||||
|
}
|
||||||
|
catch (DllNotFoundException)
|
||||||
|
{
|
||||||
|
// Ignore DllNotFoundException
|
||||||
|
// This which indicates 'Wlanapi.dll' isn't present (eg. Windows Servers)
|
||||||
|
}
|
||||||
|
|
||||||
// Determine Primary Adapters
|
// Determine Primary Adapters
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user