PowerShell tips: Sending emails in PowerShell

In today’s fast-paced IT environments, automating routine tasks is not just beneficial; it’s essential. One of the most common automation tasks is sending emails. PowerShell, with its versatile cmdlets and scripting capabilities, provides a powerful tool for this purpose. This article delves into how you can leverage PowerShell to send emails, both with and without

Read More

How to delete files by age with PowerShell

You can easily use PowerShell to delete files that are older than x minutes/hours/days. This is useful if you have a temporary folder which you would like to regularly clear down. Please see the below examples: Delete files older than x minutes Get-ChildItem -path C:\temp | where {$_.Lastwritetime -lt (date).addminutes(-5)} | remove-item Delete files older

Read More