Scripts, Tech Random's, Tips and Tricks

Send an Email Using Command Prompt or Batch File Script with PowerShell

Apply this line to any CMD line, Run as Administrator PowerShell.exe -NoProfile -ExecutionPolicy Bypass C:\Users\backups\Desktop\email.ps1 Then create a new text file and save it as a .PS1 —– #this works, just sends a simple email $smtpServer = “” $smtpFrom = “FROMEMAILENTERHERE” $smtpTo = “TOEMAILENTERHERE” $smtpSubject = “This is my email subject” $username = “email_username” $password = “email_password” $body = “yo…

Continue Reading