Page 1 of 1

Getting the Fully Qualified Domain Name

Posted: Fri Sep 05, 2025 9:31 am
by Kostya
Hello,

I need to get a fully qualified domain name (FQDN) if the computer is part of a domain, and a short computer name if not. Is it possible to do this using standard InstallAware commands?

Thanks,
Kostya

Re: Getting the Fully Qualified Domain Name

Posted: Fri Sep 05, 2025 11:39 am
by JohnGaver
The Get System Settings command is your friend.

Have you looked at the following parameters:

Logged on Computer Name
Logged on Domain Name

Re: Getting the Fully Qualified Domain Name

Posted: Mon Sep 08, 2025 2:35 am
by Kostya
John, thanks for your reply! The thing is that when I tried the Get System Settings command, if the computer is not part of a domain, then the domain name is not empty, but the same as the computer name. Combining the computer and domain name values I would get "COMPUTER1.COMPUTER1". Although, in this case I need the computer name only.

So, I expected that with the Logged on Domain Name parameter it returns an empty value in the described case. If it does not, then can I be sure that if the values ​​I get when using the Logged on Computer Name and Logged on Domain Name parameters are the same, then the computer is not part of a domain and the obtained domain name can simply be discarded? I'm just afraid I'm missing a more correct way to determine this.

Re: Getting the Fully Qualified Domain Name

Posted: Mon Sep 15, 2025 2:52 am
by Kostya
John, since this still remains unclear, let me ask you straight: was it intended and is it correct that if my computer is not part of a domain, the following command returns the computer name?

Code: Select all

Set Variable DOMAIN_NAME to
Get System Setting Logged on Domain Name into DOMAIN_NAME

In this case, I will have to determine the "not part of a domain" case somehow differently, since I don't find any command for this.

Re: Getting the Fully Qualified Domain Name

Posted: Mon Sep 15, 2025 9:22 am
by JohnGaver
Oh I missed your reply from last week!

I have been able to confirm that this behavior is as designed - if the user hasn't been joined to a domain, the returned domain name is simply the name of the local device.

You could maybe compare the two values, and if they are equal - conclude that the computer has not been joined to a domain?

Re: Getting the Fully Qualified Domain Name

Posted: Wed Sep 17, 2025 2:20 am
by Kostya
Got it, thanks for confirming! Yes, this way works.