Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm having issues with a Power BI gateway, I installed it as a service and with admin permissions, but it just works a few hours. On it's documentation there is a sentence: "The gateway cannot be installed on a domain controller". How can I check if my Windows is a domain controller?
Solved! Go to Solution.
I fixed it creating a cmd script to restart the Power BI gateway and creating a task schedule to execute that script sometimes in a day.
Cmd's file code:
net stop DIAHostService net start DIAHostService
And this is the content of the task scheduler:
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <Date>2017-04-12T09:17:09.7077677</Date> <Author>YOUR_USER_NAME</Author> <Description>This task restarts the PowerBI Gateway (DIAHostService) sometimes in a day.</Description> </RegistrationInfo> <Triggers> <CalendarTrigger> <Repetition> <Interval>PT1H</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <StartBoundary>2017-04-12T09:20:26</StartBoundary> <ExecutionTimeLimit>PT30M</ExecutionTimeLimit> <Enabled>true</Enabled> <ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> </CalendarTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>YOUR_USER_NAME</UserId> <LogonType>Password</LogonType> <RunLevel>HighestAvailable</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>true</WakeToRun> <ExecutionTimeLimit>PT5M</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>PATH_TO_CMD_FILE\restart_powerbi_service.cmd</Command> </Exec> </Actions> </Task>
Save this file as xml and import it on Windows Task Scheduler. Don't foget to change YOUR_USER_NAME by the user name of the machine that the Power BI gateway is running And change PATH_TO_CMD_FILE to the location of your cmd file.
Hope it helps.
I fixed it creating a cmd script to restart the Power BI gateway and creating a task schedule to execute that script sometimes in a day.
Cmd's file code:
net stop DIAHostService net start DIAHostService
And this is the content of the task scheduler:
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <Date>2017-04-12T09:17:09.7077677</Date> <Author>YOUR_USER_NAME</Author> <Description>This task restarts the PowerBI Gateway (DIAHostService) sometimes in a day.</Description> </RegistrationInfo> <Triggers> <CalendarTrigger> <Repetition> <Interval>PT1H</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <StartBoundary>2017-04-12T09:20:26</StartBoundary> <ExecutionTimeLimit>PT30M</ExecutionTimeLimit> <Enabled>true</Enabled> <ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> </CalendarTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>YOUR_USER_NAME</UserId> <LogonType>Password</LogonType> <RunLevel>HighestAvailable</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>true</WakeToRun> <ExecutionTimeLimit>PT5M</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>PATH_TO_CMD_FILE\restart_powerbi_service.cmd</Command> </Exec> </Actions> </Task>
Save this file as xml and import it on Windows Task Scheduler. Don't foget to change YOUR_USER_NAME by the user name of the machine that the Power BI gateway is running And change PATH_TO_CMD_FILE to the location of your cmd file.
Hope it helps.
nltest /dclist:{domainname}
Lists all DC's in a domain
@Greg_Deckler, Do I have to change the {domainname}? If I understand your solution correctly, I run that command and got this output:
nltest /dclist:{domainname} Cannnot find DC to get DC list from Status.= 1355 0x54b ERROR_NO_SUCH_DOMAIN.
Yes, replace {domainname} with the name of your domain.
@Greg_Deckler, I changed it to my current domain name and I got a list of 14 DCs. So, is my machine a domain controller? If yes, what is the solution for that?
Check the name of your machine against the list of DC's returned. If your machine is in the list, it is a DC. Use "hostname" from the command prompt to get your computer name. Also, use "set" from the command prompt to verify that you entered the correct domain. Look for the USERDOMAIN property.
@Greg_Deckler, thank you! My machine isn't a DC. Can you tell me what is the next step to find what is my problem? The Power BI's site is telling me that my gateway is offiline, but my machine has a internet conexion and the Data Management service is still running.