Skip to content

Commit ae1bd9c

Browse files
committed
[Refactor/ADDS Check] Remove unnecessary check
1 parent 36eff43 commit ae1bd9c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Elements/AutoUnattend/ActiveDirectory/DomainServicesModule.vb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ Module DomainServicesModule
8282
DynaLog.LogMessage("Checking if device is part of a domain...")
8383
If DSIsInDomain() Then
8484
DynaLog.LogMessage("This device is part of a domain. Grabbing name...")
85-
Dim domain As IntPtr = GetDomainNameInformation()
86-
If domain <> IntPtr.Zero Then
87-
DynaLog.LogMessage("GetDomainNameInformation did not return bogus data. Parsing...")
88-
domainName = GetComputerDomain().Name ' Get it from AD DS .NET API
89-
End If
85+
domainName = GetComputerDomain().Name ' Get it from AD DS .NET API
9086
End If
9187
DynaLog.LogMessage("Domain name: " & ControlChars.Quote & domainName & ControlChars.Quote & ". If it's empty, it could be because the device is not part of a domain.")
9288
Return domainName

0 commit comments

Comments
 (0)