How to Find Dates in Strings with PowerShell?

powershell find date in string

Have you ever needed to pull dates out of log files, email subjects, filenames, or messy text data? Maybe you’re parsing server logs to find when errors occurred, or you need to extract invoice dates from a pile of documents. Finding and extracting dates from strings is one of those tasks that seems simple until … Read more

PowerShell Get-Date -UFormat Examples

PowerShell Get-Date -UFormat

In this tutorial, I will explain how to use the PowerShell Get-Date -UFormat with some useful examples. The -UFormat parameter provides Unix-style formatting capabilities that help customize date and time output. PowerShell Get-Date -UFormat The -UFormat parameter in PowerShell’s Get-Date cmdlet allows you to format dates using Unix-style format specifiers. This approach gives you granular … Read more

PowerShell Get-Date Month Name

PowerShell Get-Date Month Name

In this tutorial, I will explain how to get month names using PowerShell’s Get-Date cmdlet. We will see different methods with examples. Method 1: Using Get-Date with Format Strings The most straightforward way to get month names in PowerShell is using the Get-Date cmdlet with format strings. This method is particularly useful when you want … Read more

PowerShell Get Difference Between Two Dates in Minutes

get difference between two dates in minutes in powershell

When working with PowerShell, I recently got a requirement to calculate the difference between two dates in minutes. In this tutorial, you’ll learn — step by step — how to get the difference between two dates in minutes using PowerShell. I will show you from the basics to advanced use cases with examples. Date and … Read more

PowerShell (Get-Date).AddDays(0) [With Examples]

PowerShell (Get-Date).AddDays(0)

Are you working with the Get-Date PowerShell cmdlet? I will show you how to work with the AddDays(0) method in PowerShell. In this tutorial, we’ll explore everything you need to know about using (Get-Date).AddDays(0) with various examples. Understanding Get-Date in PowerShell The Get-Date cmdlet returns a DateTime object that represents the current date and time … Read more

How to Create a Folder with the Current Date using PowerShell?

Create a Folder with the Current Date using PowerShell

In this tutorial, I will explain how to create a folder with the current date as the name using PowerShell. This can be very useful for organizing files and automating folder creation based on dates. We will see several examples in PowerShell demonstrating different ways to accomplish this. As an IT professional in the USA, … Read more

How to Add Date to Filename Using PowerShell?

Add Date to Filename Using PowerShell

One of my team members was working on some files in PowerShell, and they had to add the current date to the file name. I suggested a few methods. In this tutorial, I will explain how to add the date to a filename using PowerShell with examples. To add a date to a filename during … Read more

How to Get the Last Friday of the Month Using PowerShell?

powershell get last friday of the month

If you’re working with dates in PowerShell, you might find requirements like determining the last Friday of a given month. In this tutorial, I will explain how to find the last Friday of the month using PowerShell with examples. To find the last Friday of the month using PowerShell, you can create a custom function … Read more

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.