<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can Repository.exe be run Headlessly? in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Can-Repository-exe-be-run-Headlessly/m-p/2535906#M32354</link>
    <description>&lt;P&gt;Closing the loop on this, I was able to find a solution that worked by creating a Scheduled Task in Windows.&lt;/P&gt;&lt;P&gt;Abbreviated PowerShell:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Qlik\Sense\Repository\Repository.exe' -Argument '-bootstrap -standalone -restorehostname'
$principal = New-ScheduledTaskPrincipal -UserId (whoami) -LogonType Password -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -MultipleInstances IgnoreNew
$taskDefinition = New-ScheduledTask -Action $action -Principal $principal -Settings $settings
$taskName = 'QlikSense_Bootstrap_RestoreHostname'
$task = Register-ScheduledTask -TaskName $taskName -InputObject $taskDefinition -User (whoami) -Password $env:QLIK_ADMIN_PASSWORD -Force
$task | Start-ScheduledTask
# custom logic to poll the task status; the process often stalls trying to find the license server
Stop-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allowed me to move forward, and I have been able to fully automate an entire Qlik migration without RDP'ing into the VM.&lt;/P&gt;&lt;P&gt;Some more details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Qlik Sense Enterprise on Windows May 2023&lt;/LI&gt;&lt;LI&gt;Windows Server 2022 Datacenter Azure Edition&lt;/LI&gt;&lt;LI&gt;PowerShell version:&amp;nbsp;5.1.20348.4294&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 11 Nov 2025 19:12:04 GMT</pubDate>
    <dc:creator>ahaleiii-craneware</dc:creator>
    <dc:date>2025-11-11T19:12:04Z</dc:date>
    <item>
      <title>Can Repository.exe be run Headlessly?</title>
      <link>https://community.qlik.com/t5/Management-Governance/Can-Repository-exe-be-run-Headlessly/m-p/2531941#M32255</link>
      <description>&lt;P&gt;Hello, I am trying to automate a migration of our existing Qlik Sense Enterprise for Windows instance to a new VM. As part of this migration, and due to compliance requirements, we are forbidden from RDPing into the VM, so the install &amp;amp; restore must be performed in an automated fashion via Ansible/PowerShell.&lt;/P&gt;&lt;P&gt;One of the steps which must be run as part of migrating is running the Repository.exe with the arguments "-bootstrap -standalone -restorehostname" to align the migrated data with the new server. (Using &lt;A title="Restoring a Qlik Sense site to a machine with a different hostname" href="https://help.qlik.com/en-US/sense-admin/May2023/Subsystems/DeployAdministerQSE/Content/Sense_DeployAdminister/QSEoW/Deploy_QSEoW/Restoring-a-site.htm#anchor-2" target="_self"&gt;this doc&lt;/A&gt; and &lt;A title="STT - Migrating Qlik Sense Client-Managed" href="https://www.youtube.com/watch?v=CYwN2EmlK9o&amp;amp;t=1058s" target="_self"&gt;this video&lt;/A&gt; as references.)&lt;/P&gt;&lt;P&gt;I am able to run this command in a PowerShell terminal manually, but the moment I put it into a script and try to capture the output, it fails with this error:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[ERROR] Fatal exception during bootstrap: The handle is invalid.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean&amp;amp; succeeded)
   at Qlik.Sense.Common.ConsoleUtility.ClearConsoleLine(Int32 offset)
   at Repository.Core.Bootstrap.BootstrapHandler.Initialize()
   at Repository.QRSMain.AssembleConfiguration(IEnumerable`1 args)
   at Repository.QRSMain.Run(String[] args, Action`1 terminate)
Bootstrap mode has terminated. Press ENTER to exit..&lt;/LI-CODE&gt;&lt;P&gt;Is there a way to run Repository.exe in a way that I can capture the output and parse it in my script to take automated actions from the results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 17:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Can-Repository-exe-be-run-Headlessly/m-p/2531941#M32255</guid>
      <dc:creator>ahaleiii-craneware</dc:creator>
      <dc:date>2025-09-26T17:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can Repository.exe be run Headlessly?</title>
      <link>https://community.qlik.com/t5/Management-Governance/Can-Repository-exe-be-run-Headlessly/m-p/2535906#M32354</link>
      <description>&lt;P&gt;Closing the loop on this, I was able to find a solution that worked by creating a Scheduled Task in Windows.&lt;/P&gt;&lt;P&gt;Abbreviated PowerShell:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Qlik\Sense\Repository\Repository.exe' -Argument '-bootstrap -standalone -restorehostname'
$principal = New-ScheduledTaskPrincipal -UserId (whoami) -LogonType Password -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -MultipleInstances IgnoreNew
$taskDefinition = New-ScheduledTask -Action $action -Principal $principal -Settings $settings
$taskName = 'QlikSense_Bootstrap_RestoreHostname'
$task = Register-ScheduledTask -TaskName $taskName -InputObject $taskDefinition -User (whoami) -Password $env:QLIK_ADMIN_PASSWORD -Force
$task | Start-ScheduledTask
# custom logic to poll the task status; the process often stalls trying to find the license server
Stop-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allowed me to move forward, and I have been able to fully automate an entire Qlik migration without RDP'ing into the VM.&lt;/P&gt;&lt;P&gt;Some more details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Qlik Sense Enterprise on Windows May 2023&lt;/LI&gt;&lt;LI&gt;Windows Server 2022 Datacenter Azure Edition&lt;/LI&gt;&lt;LI&gt;PowerShell version:&amp;nbsp;5.1.20348.4294&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 11 Nov 2025 19:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Can-Repository-exe-be-run-Headlessly/m-p/2535906#M32354</guid>
      <dc:creator>ahaleiii-craneware</dc:creator>
      <dc:date>2025-11-11T19:12:04Z</dc:date>
    </item>
  </channel>
</rss>

