MSEndpointMgr/Intune

Update Certificates/Install-MSIntuneNDESServer.ps1 $ServerFQDN

kbrakefi opened this issue · 0 comments

Currently, code to retrieve $ServerFQDN from "Certificates/Install-MSIntuneNDESServer.ps1" retrieves the logged on user's domain to append to the computername:
$ServerFQDN = -join($env:COMPUTERNAME, ".", $env:USERDNSDOMAIN.ToLower())

To make this more universal, in case the user logged in is not in the server domain, suggest using the .NET class:
$ServerFQDN = [System.Net.Dns]::GetHostByName($env:computerName).HostName

This will make the variable correct independent of the logged on user's DNS domain.