Featured Articles
Codebase
Send mail through SendGrid Web API using PowerShell
Learn how to use the Twilio SendGrid Web API v3 to send email with PowerShell
The Codebase category is a curated repository of scripts, snippets, and programming insights designed to automate the mundane and solve the complex. Rather than generic examples, these posts focus on functional logic in PowerShell, PHP, Python, and Batch—tailored for system administrators and DevOps engineers who need code that works in production environments.
From deep-dives into regular expressions and API integrations to optimizing legacy scripts for modern kernels, this section serves as a technical reference for building more efficient workflows. Whether you are refactoring a deployment script or debugging a niche environment variable, you’ll find the practical code blocks and logic needed to bridge the gap between development and operations.
Codebase
Learn how to use the Twilio SendGrid Web API v3 to send email with PowerShell
Codebase
Last updated:
Use a specific TLS certificate or thumbprint for outgoing HTTPS connections using PowerShell. Because sometimes there are endpoint restrictions in place.
Codebase
Last updated:
Learn how to use PowerShell Test-NetConnection to test if a TCP port is open
Codebase
Last updated:
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.
Codebase
Last updated:
Remove application folders from the website configuration in IIS whose physical path on the filesystem was removed, using PowerShell
Codebase
Last updated:
MySQL Connector/NET and utf8mb4 character set can cause an exception System.Collections.Generic.KeyNotFoundException “The given key was not present in the dictionary”.
Codebase
Last updated:
Modern connection string examples for ASP.NET Core, Legacy ASP.NET, and Classic ASP. Learn how to use MSOLEDBSQL, ODBC 18, and fix MySQL UTF-8/Emoji support.
Codebase
Last updated:
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:
Get the current number of active FTP client connections on your Windows Server IIS FTP Service using the Get-Counter cmdlet and the Microsoft FTP Service Current NonAnonymous Users performance counter.
Codebase
Last updated:
Windows PowerShell is an important tool in Windows Server for administrators. You can use PowerShell for Windows Server administration, software installation, automation, and shell/command-prompt scripting.
Codebase
Last updated:
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:
Send mail over authenticated SMTP using TLS, in PHP, ASP and ASP.NET. Send email securely from your website. Ready to use examples!
Codebase
Last updated:
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.
Codebase
Last updated:
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:
Change file attributes with PHP chmod to make files read-only or normally accessible on Windows Server IIS.
Codebase
Last updated:
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.
Codebase
Last updated:
Check the connectivity of multiple MySQL servers, and connect to the servers in a loop. Here are two example code snippets
Codebase
Last updated:
MySql.Data.MySqlClient ASP.NET test script
Codebase
Last updated:
Async PHP calls with XMLHttpRequest
Codebase
Last updated:
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.