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

PowerShell: Get the Last Day of the Previous Month

powershell get last day of previous month

While working with dates in PowerShell recently, I was required to get the last day of the previous month. In this tutorial, I will explain different methods to get the last day of the previous month using PowerShell with examples. To get the last day of the previous month in PowerShell, you can use the … Read more

How to Get the First Day of Next Month in PowerShell?

powershell get first day of next month

If you’re working with dates in PowerShell, you might need to get the first day of the next month. As a PowerShell developer, you might meet this requirement. In this tutorial, explain several methods to get the first day of the next month using PowerShell with examples. To get the first day of the next … Read more

How to Get Day of Month in PowerShell?

PowerShell Get Last Day of Month

One of my team members required me to get the first day of the month using PowerShell. It is easy to do this. In this tutorial, I will explain how to get the day of the month in PowerShell, like getting the last day of the month, using PowerShell with complete scripts and examples. PowerShell … Read more

PowerShell Get Day of Week

powershell get day of week

Recently, I got a requirement to get the day of the week in PowerShell. In this tutorial, I will explain how to get the day of the week using PowerShell with examples. To get the current day of the week in PowerShell, you can use the Get-Date cmdlet followed by accessing the DayOfWeek property. Simply … Read more

How to Add Months to Date in PowerShell?

powershell date add months

Someone recently tried to add months to the current date in PowerShell. In this tutorial, I will explain how to add months to date in PowerShell with examples. To add months to a date in PowerShell, you can use the AddMonths method of the DateTime object. For example, to schedule a follow-up meeting three months … Read more

PowerShell Date Comparison [With Examples]

powershell date comparison

Recently, I worked on a PowerShell script that required date comparisons. In this tutorial, I will explain how to compare dates in PowerShell with examples. To compare dates in PowerShell, you can use the DateTime object along with comparison operators such as -eq (equal), -ne (not equal), -lt (less than), -le (less than or equal), … Read more

How to Sort Files by Date in PowerShell?

powershell sort files by date

Recently, someone asked me about sorting files by date in PowerShell. In this tutorial, I will show you how to sort files by date in PowerShell using different methods with examples. To sort files by date in PowerShell, you can use the Get-ChildItem cmdlet combined with Sort-Object. For example, to sort files in the C:\Logs … 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.