PowerShell script to send activation link emails for Forgot Password or Reset Password requests

PowerShell script to send activation link emails for Forgot Password or Reset Password requests Scenario: We know there are plenty number of web sites online and almost all of them will have a user login page with support for “Forgot Password”/”Reset Password” option.  Considering it such a basic functionality, whatif this “Forgot Password”/”Reset Password” request email system has issues and you want to setup an automation script in the interim.  This script will address such a requirement and can come handy for most of the web developers. Requirement Specifications: A Powershell script that Runs on a Windows Server 2008 x64 […]

Read more

PowerShell v1.0: Script to send email messages

$smtpServer = "192.68.4.2" $smtpFrom = “admin@example.com” $smtpTo = "reportuser@example.com" $messageSubject = “Automation: Output Report ” $messageBody = “Script Completed successfully without any errors.” $smtp = New-Object Net.Mail.SmtpClient($smtpServer) $smtp.Send($smtpFrom,$smtpTo,$messagesubject,$messagebody)   If you specify an incorrect SMTP server, you’ll end up receiving the below error message: PS C:> powershell.exe C:TestSend-Emails.ps1 Exception calling "Send" with "4" argument(s): "Failure sending mail." At C:TestSend-Emails.ps1:29 char:19 +         $smtp.Send( <<<< $smtpFrom,$smtpTo,$messagesubject,$messagebody) Mail already sent to [govardhan@testdom.com]

Read more

PowerShell: Connecting and Querying Oracle DataBase contents from a Windows 7 x64 system, Display results row by row

Important points to consider from the environment of this automation: Your base Windows is a x64 bit OS Your remote Oracle DB is of a x64 bit version on a x64 system You install Oracle Client which is available ONLY in x86 version Thus, your DSN to Oracle client is as well a x86 version, can be viewed in C:WindowsSysWOW64odbcad32.exe Thus, you can connect to your Oracle from a x86 applications only by using the Oracle Client driver Thus, you need to run your PowerShell script from x86 version only: "C:Windowssyswow64Windowspowershellv1.0powershell.exe" Configuring DSN to Oracle DB on Windows 7 x86: […]

Read more