How to Get File Extensions from Filenames in PowerShell?

Get File Extensions from Filenames in PowerShell

I was working on an automation project when I was required to extract file extensions from filenames using PowerShell. I tried different methods, and in this tutorial, I will explore various methods to retrieve the file extension from a filename in PowerShell with complete scripts. To get the file extension from a filename in PowerShell, … Read more

How to Get File Version in PowerShell?

Get File Version in PowerShell

Recently, I got a requirement to get the file version in PowerShell. This could be particularly useful when managing software updates, verifying installed application versions, or during software deployment processes. In this blog post, we will explore different methods to get the file version using PowerShell. To get the file version in PowerShell, you can … Read more

How to Check if a Folder is Empty in PowerShell?

Check if a Folder is Empty in PowerShell

While working with files and directories, you might encounter the need to check if a folder is empty. PowerShell provides different ways to do this. In this PowerShell tutorial, we will explore different methods for checking for an empty directory using PowerShell. To check if a folder is empty in PowerShell, you can use the Get-ChildItem cmdlet … Read more

How to Create folder if not exist in PowerShell?

Create folder if not exist in PowerShell

This is a very common requirement; you will often need to create a folder if it doesn’t exist in PowerShell. PowerShell provides a simple and effective way to check if a folder exists and create it if it doesn’t. In this tutorial, we will explore different methods for creating a folder if it doesn’t exist … Read more

How to Get File Creation Date in PowerShell?

Get File Creation Date in PowerShell

When managing files on a Windows system, you might often need to know when a file was created. In this PowerShell tutorial, we’ll explore various methods to get the file creation date using PowerShell with various examples. To get the file creation date in PowerShell, you can use the Get-Item cmdlet followed by accessing the CreationTime property of the … Read more

How to Get Details of a File in PowerShell?

Get Details of a File in PowerShell

Do you want to get meta data of a file using PowerShell? In this tutorial, I will explain how to get details of a file in PowerShell. We will cover various methods to retrieve file metadata, attributes, and content, etc. To get details of a file in PowerShell, you can use the Get-ItemProperty cmdlet to … Read more

How to Find File by Name in PowerShell?

One of my team members got a requirement to find files by name using PowerShell while working on an automation project. In this tutorial, I will show you different methods to find files by name in PowerShell. To find a file by name using PowerShell, you can utilize the Get-ChildItem cmdlet combined with the -Name parameter for a basic … Read more

How to Delete Contents of Folder in PowerShell?

Delete Contents of Folder in PowerShell

It is easy to delete the contents of a folder using PowerShell. Do you have a similar requirement? In this blog post, we’ll explore different methods to delete the contents of a folder using PowerShell with complete scripts. To delete the contents of a folder in PowerShell, use the Remove-Item cmdlet with the path to … Read more

How to Count Files in a Folder Using PowerShell?

Count Files in a Folder Using PowerShell

You might encounter situations where you need to count the number of files present in a folder using PowerShell. In this tutorial, I will explain how to count files in a folder using PowerShell. To count files in a folder using PowerShell, you can use the Get-ChildItem cmdlet combined with the Measure-Object cmdlet. For example, … Read more

How to Rename Files with Date in PowerShell?

Rename Files with Date in PowerShell

Recently, I got a requirement to rename a file by appending the current date in PowerShell. I tried different methods, and in this PowerShell tutorial, I will explain to you how to rename files with date in PowerShell using various methods. To rename a file in PowerShell and append the current date, you can use … 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.