Codebase

Last updated:

Send email with PowerShell

Easily send your DevOps reporting by email with this PowerShell function, because the Send-MailMessage cmdlet is obsolete. Of course you’ll be using StartTLS and authenticated SMTP as additional security.

apt-cache search monit lists "monit – utility for monitoring and managing daemons or similar programs"

Codebase

Last updated:

MySQL Connector/ODBC C# test script

Whenever you need to test your ASP.NET connection to your MySQL database, using ODBC, you can use the following C# test script. Currently it uses MySQL ODBC 8.0 Unicode Driver, but you can easily change the version used

Codebase

Last updated:

PowerShell return value, exit code, or ErrorLevel equivalent

Verifying PowerShell exit code using the $? operator or $LASTEXITCODE is how you find out whether an external command was executed successfully in PowerShell. The operator $? contains True if the last operation succeeded and False otherwise.

Codebase

Last updated:

Find all files owned by a particular user using PowerShell

Sometimes you need to find all files owned by a specific user, recursively on your Windows Server NTFS file system. PowerShell has some neat cmdlets to automate this task for you and here is how.

a rusted iron gate with a chain hanging from it

Codebase

Last updated:

Test SMTP authentication and StartTLS

Investigate SMTP authentication issues like a boss! When using TLS encrypted SMTP connections, it’s always handy if you are able to create a SMTP logon credentials and test SMTP authentication over a TLS/StartTLS connection. Preferably from your command-prompt.

Codebase

Last updated:

Add (custom) headers to MailMessage class

The System.Net.Mail Namespace leaves out the required Message-ID header in email. Here is how you can add this important header to your email, to make sure email arrives.

blue elephant plush toy on black laptop computer -- Photo by Ben Griffiths

Codebase

Last updated:

Optimize all MySQL tables with MySQLi multi_query

PHP MySQLi extension supports multiple queries which are concatenated by a semicolon. We can use this to optimize all MySQL tables in one single multi_query statement.