Powershell HTML message inline images - email

i was trying to make a bulk email send using Powershell, however i'm not able to use the code to use images inside the code (inlineattachments), it says that the command is not recognize. is there any way to create a HTML document and send it by mail from PS with the in line images?

-InilineAttachments parameter won't be present in Send-MailMessage cmdlet which is from Module Microsoft.PowerShell.Utility , You have to download the script Send-MailMessage.ps1 , Dot source it . \Send-MaiMessage then use the new function.
Regards,
kvprasoon

Related

Find/Replace AMPScript

Is there a method to Find/Replace using AMPScript? I want to use AMPScript to search through an email to find sections of copy and replace them with alternative copy. I have been using the REPLACE() function but I have been unable to use it in this manner. Its requiring that I have a variable and that variable is then used through %%=v(#var)=%% to output when rendering the email. But it does not search the email body for the appropriate copy. 
This is one part of a larger project that uses the Sales Console to at first display the copy and then trying to using this functionality in Content Builder to change copy. 
​​​​​​​If anyone has any suggestions it would be appreciated as Im going in circles looking for solutions.  

How to pass parameters to a Powershell script with UiPath

I am trying to run a powershell script with uipath. I have found two approaches to run it;
Read the script as a text and pass to Invoke Powershell activity
Use Run powershell script activity from Script Activities package
Now I need to pass arguments to the powershell script from uipath. Some have mentioned about formatting the string with parameters and invoking the script.
But, rather than that, think we can directly pass parameters from UiPath.
In Run Powershell script, it has Parameters as input
In Invoke Powershell, it has Parameters under Input section and PowershellVariables under Misc
I have been searching for a while. But still I am unable to figure out how to pass parameters using above activities.
I am trying to send outlook mails using powershell. Still in the process of learning how to work with it. Plz help…
EDIT
Found solution for one approach. Added it as an answer.
Found an answer from this link. Out of the two approaches, it provides a solution to pass the parameters using Invoke Power Shell activity.
Read the .ps1/.txt file containing the script, with Read Text File activity
Call the Invoke Power Shell activity by passing file content as CommandText and parameters in the Parameter collection.
But, it would be great, if I can get to know how to pass parameters using Run power shell script activity.

Add Help File to Module

I've created some Modules and want to add some Get-Help files to give a little subscription or tutorial for my coworkers.
I've added the specific help-files in the right Directory-Folder and covert the files in the right Unicode Format like the description on the MSDN site.
Now I give the cmd Get-Help ModuleName but nothing loads except the normal help which is given from Powershell?
One way is to write the help inside the module file directly
<#
.Synopsis
Whatever you want to display.
.Description
A description for the same.
.Parameter Start
Whatever Parameter start you want .
.Parameter End
Whatever Parameter end you want to display.
.Example
# Show an example below.
Example of the function
#>
Other ways are : Listed
HERE and External Help for PS Modules
Hope it helps.

How to attach a flat file into informatica Email?

I want to send a mail to some users after workflow is done. This email should contain 3 xls file or 1 xls file with 3 sheets. The xls file contains a query result -less than 50 rows- which is loaded by a task dynamically on each run of the workflow.
So in Informatica I couldn't see an option inside the "Email" task to attach anything. Can you help me please?
You cannot send emails with attachments using the Email task (don't ask me why, I cannot imagine any reason for that and this is how it is).
However, sessions can send emails and these emails may contain attachments - the appropriate options are on the Components tab, the variable you need is %a<>.
More information: How to attach new files to email task?
cat filename | mailx -s "subject" abc#def.com
or
use mutt command to send files as attachments
At session level, in components tab we have option to send mail along with attachments.we have to provide path of the file as well using %a<> built in command.
Example:-
%a

Read pdf files in perl

I have a collection of pdfs and would like to read those pdfs through a perl program. I just want to read and print those pdfs. Is there any module available in perl to do this?
If you want to automate printing, I would recommend to use the command line interface of the Acrobat reader.If you want to parse the content, I would use CAM::PDF, but the results depend strongly on the pdf.
The command line parameters for printing are
AcroRd32.exe /t filename printername drivername portname
Depending exactly what you want to do with the PDFs and their contents (that is, do you want a perl module which essentially replaces Acrobat Reader, or do you just want to extract and print the text of the documents) CPAN might provide what you want as it contains quite a few modules related to PDFs: CPAN Search of PDF modules