- Module Name: LIB POWERSHELL
- Description: VGL POWERSHELL LIBRARY
- Purpose: Library to provide easy implementation of various powershell tasks
- Description: VGL POWERSHELL LIBRARY
This is a pure VGL implementation to call powershell task such as sending emails. It removes the need for third party programs like BLAT.
The routines are suitable for both foreground and background operations. This means they can be invoked from either MODE BACKGROUND
or MODE INTERACTIVE
.
This library does not have a user interface.
This work is published under the smile license. The details are behind the link, but the gist of it is
Do whatever you want, as long as you do something good (help someone out, smile; just be nice) and please don't sue
- Jingyu Sung : Original concept of powershell mail
Send a email using powershell, without attachments. Plain text, body does not support HTML.
Parameters:
- from_mail
- to_mail
- subject_line
- mail_body
- smtp_server
- smtp_port
- smtp_user
- smtp_password
Send a email using powershell, with attachments. Plain text, body does not support HTML.
Parameters:
- from_mail
- to_mail
- subject_line
- mail_body
- smtp_server
- smtp_port
- smtp_user
- smtp_password
- attachments
This lib checks if powershell is installed on the target systems. If Powershell cannot be found the routines will not be executed
Routines in this library are GLOBAL
. Add and compile this library and call the routines whenever desired.
All routines accept the necessary parameters as values to avoid forcing the programmer to code set names.
JOIN LIBRARY lib_powershell
ps_sendmail(
"[email protected]",
"[email protected]",
"This is the email subject",
"This is the email body text",
"mail.mymailserver.extension",
"25",
"[email protected]",
"Totally not my password"
)
The above example joins the powershell library, thus making it's routines available and then sends an email using the ps_sendmail
routine.