How to send an email with PowerShell using SendGrid API

how-to-send-an-email-with-powershell-using-sendgrid-api

I really like event-driven notifications that can trigger different webhooks and it’s really fun putting them together like pieces of lego to automate workflows.

The most common and simple notification method is via email, but there are scenarios where environments for security reasons and by design have just access to the internet on port 80/443  and this connection is often mediated via a web proxy.

Not having access to SMTP protocol can be a roadblock but, in this article, we will implement a solution to send an email with PowerShell under these limitations without changing Firewall Rules or NSG.

Continue reading “How to send an email with PowerShell using SendGrid API”

PowerShell: When and Where Writing Logs Matters

powershell-when-and-where-writing-logs-matters

In the early days of my career, I had the epiphany that “Best Practices” really do not exist or apply to most scenarios. It should be all driven by logic and common sense in the end. What makes much more sense is to find the standard /common practice compares to the mythological unicorn of “best practices” and see if has value and benefit in a specific case. Continue reading “PowerShell: When and Where Writing Logs Matters”

Removing a phishing email from all Exchange 2016 mailboxes with PowerShell

Does’t matter how good is your security and design in your environment with with complex spam filters, gateways and appliances… sooner or later you’ll need to remove some sort of unwanted communication from one or more mailboxes on your Exchange Server.

In a very common incident response scenario like this, PowerShell is a very useful tool, this time the cmdlet used is New-ComplianceSearch and is available on-premises and on cloud services for Exchange Server 2016.

Continue reading “Removing a phishing email from all Exchange 2016 mailboxes with PowerShell”