<?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: Do we have any Command/PowerShell script to update the user id and password of QMC data connection.? in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508924#M14673</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am able to update the manual QMC data connection password using below script.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo off
SET PGPASSWORD=Qlik@123
echo Qlik password %PGPASSWORD%
cd /D "D:\Program Files\Qlik\Sense\Repository\PostgreSQL\14\bin\"
psql -h localhost -p 4432 -U postgres -d QSR
UPDATE public."DataConnections" SET "PasswordString"='%PGPASSWORD%' WHERE "Name"='Mydataconenciton ';&lt;/LI-CODE&gt;
&lt;P&gt;But when I am trying to pass the password variable that is not working. Could you please suggest how can id pass the variable in update command last line in my script.&lt;/P&gt;
&lt;P&gt;Thank you.!!!&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 07:07:51 GMT</pubDate>
    <dc:creator>jrathgebercs</dc:creator>
    <dc:date>2025-03-10T07:07:51Z</dc:date>
    <item>
      <title>Looking for Command/PowerShell script to update the user id and password of QMC data connection.</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508478#M14660</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;We don't have permission to enter manual service user password.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do we have any Command/PowerShell script to update the user id and password of QMC data connection.?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jrathgebercs_2-1741197927962.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178181i62EEA3E58BB0784F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jrathgebercs_2-1741197927962.png" alt="jrathgebercs_2-1741197927962.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jrathgebercs_1-1741197643004.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178180iEE3B553A84CA6D2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jrathgebercs_1-1741197643004.png" alt="jrathgebercs_1-1741197643004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you please help on this to resolve this issue.&lt;/P&gt;
&lt;P&gt;Thank you.!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 10:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508478#M14660</guid>
      <dc:creator>jrathgebercs</dc:creator>
      <dc:date>2025-03-11T10:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have any Command/PowerShell script to update the user id and password of QMC data connection.?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508924#M14673</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am able to update the manual QMC data connection password using below script.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo off
SET PGPASSWORD=Qlik@123
echo Qlik password %PGPASSWORD%
cd /D "D:\Program Files\Qlik\Sense\Repository\PostgreSQL\14\bin\"
psql -h localhost -p 4432 -U postgres -d QSR
UPDATE public."DataConnections" SET "PasswordString"='%PGPASSWORD%' WHERE "Name"='Mydataconenciton ';&lt;/LI-CODE&gt;
&lt;P&gt;But when I am trying to pass the password variable that is not working. Could you please suggest how can id pass the variable in update command last line in my script.&lt;/P&gt;
&lt;P&gt;Thank you.!!!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 07:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508924#M14673</guid>
      <dc:creator>jrathgebercs</dc:creator>
      <dc:date>2025-03-10T07:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have any Command/PowerShell script to update the user id and password of QMC data connection.?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508944#M14675</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am facing one issue after update data connection using script.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jrathgebercs_0-1741596086311.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178299i87CB290D7C003A19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jrathgebercs_0-1741596086311.png" alt="jrathgebercs_0-1741596086311.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.!!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 08:41:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2508944#M14675</guid>
      <dc:creator>jrathgebercs</dc:creator>
      <dc:date>2025-03-10T08:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have any Command/PowerShell script to update the user id and password of QMC data connection.?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2509190#M14677</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Still I am looking solution for this. I got script from Qlik community URL (&lt;FONT color="#00FF00"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/t5/Deployment-Management/Update-Password-in-DataConnections-automatically/td-p/104503" target="_blank"&gt;https://community.qlik.com/t5/Deployment-Management/Update-Password-in-DataConnections-automatically/td-p/104503&lt;/A&gt;&lt;/STRONG&gt;&lt;/FONT&gt;) and trying to use but getting some error. Could you please suggest me where we need to change in this script.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# Prompt for password
$Password = Read-Host -Prompt 'Input the  new password'
# Store the Base64 Encoded package in the Host.cfg for connection
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
# Convert the base64 encoded install name for Sense to UTF data
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
# Connect to Qlik Sense using an internal account (sa_api)
Connect-Qlik -ComputerName https://$($FQDN):4242 -Username INTERNAL\sa_api
# Expose all elements of the JSON response
$rawoutput=$true
# Get the DataConnection JSON for a particular data connection
$RESTapp = Invoke-QlikGet -path "/qrs/dataconnection/full?filter=(name eq 'BMS2014')"
# Filter out the ID value for later GET
$RESTappID = $RESTapp.id
# GET the DataConnection JSON
$RESTappDC = Invoke-QlikGet -path /qrs/dataconnection/$RESTappID
# Swap the password out in the JSON
$RESTappDC | Add-Member Password $Password -Force
# Convert to actual JSON
$RESTappDC = $RESTappDC | ConvertTo-Json
# PUT in the new password
Invoke-QlikPut -path https://$($FQDN):4242/qrs/dataconnection/$RESTappID -body $RESTappDC
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I am getting below error while executing above script.:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Connect-Qlik : The term 'Connect-Qlik' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Myuser\Desktop\qlik_sense_pwd_change.ps1:8 char:1
+ Connect-Qlik -ComputerName https://$($FQDN):4242 -Username INTERNAL\s ...
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-Qlik:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Invoke-QlikGet : The term 'Invoke-QlikGet' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Myuser\Desktop\qlik_sense_pwd_change.ps1:12 char:12
+ $RESTapp = Invoke-QlikGet -path "/qrs/dataconnection/full?filter=(nam ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-QlikGet:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Invoke-QlikGet : The term 'Invoke-QlikGet' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Myuser\Desktop\qlik_sense_pwd_change.ps1:16 char:14
+ $RESTappDC = Invoke-QlikGet -path /qrs/dataconnection/$RESTappID
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-QlikGet:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Invoke-QlikPut : The term 'Invoke-QlikPut' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Myuser\Desktop\qlik_sense_pwd_change.ps1:22 char:1
+ Invoke-QlikPut -path https://$($FQDN):4242/qrs/dataconnection/$RESTap ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-QlikPut:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException&lt;/LI-CODE&gt;
&lt;P&gt;This is urgent. Please suggest .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.!!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 08:29:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Looking-for-Command-PowerShell-script-to-update-the-user-id-and/m-p/2509190#M14677</guid>
      <dc:creator>jrathgebercs</dc:creator>
      <dc:date>2025-03-11T08:29:52Z</dc:date>
    </item>
  </channel>
</rss>

