Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
keerthika
Creator II
Creator II

How to call power shell script in Qlikview

Hi,

    My code is executing in powershell but how to call that script stored in txt file from qlikview, i have encrypted the password here

$Username = "test"

$Password = "D:\test\EmailPassword.txt"

$MyCredential=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username, (Get-Content $Password | ConvertTo-SecureString)

$From = "test@gmail.com"

$To = "test@gmail.com"

$Subject = "Here's the Email Subject"

$Body = "This is what I want to say"

$SMTPServer = "smtp.gmail.com"

$SMTPPort = "587"

Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential ($MyCredential) –DeliveryNotificationOption OnSuccess

Thanks in advance,

keke

2 Replies
tresesco
MVP
MVP

Try using qlik's Execute command. Have a look here too: QlikView and Windows PowerShell

keerthika
Creator II
Creator II
Author

Hi,

I used below command to run powershell script in qlikview. but is shows some error .

  Execute cmd /C powershell -command  c:\temp\enviar_email_correto.ps1;



Thanks,

Keke