How to Get File Name Without Extension in PowerShell?

Get File Name Without Extension in PowerShell

Recently, one of my clients asked me to write a PowerShell script to find file names without extensions in a folder. I tried different methods. In this PowerShell tutorial, I will explain how to get file name without extension in PowerShell using several methods. To get the filename without the extension in PowerShell, you can … Read more

How to Create an Empty File in PowerShell?

Create an Empty File in PowerShell

Do you need to create an empty file in PowerShell? This is a very common requirement for PowerShell administrators. In this tutorial, we’ll explore different methods to create an empty file using PowerShell. To create an empty file in PowerShell, you can use the New-Item cmdlet with the syntax New-Item -Path .\example.txt -ItemType File, which … Read more

How To Get Newest File In Directory In PowerShell?

Get Newest File In Directory In PowerShell

My client wanted to do some file operations on the newest file in a directory. So, I used various PowerShell methods to get the newest file in a directory in PowerShell. To get the newest file in a PowerShell directory, you can use the Get-ChildItem cmdlet combined with Sort-Object. For example: This command retrieves the files in the … Read more

How to Create a Password-Protected Zip File Using PowerShell?

Create a Password-Protected Zip File Using PowerShell

Recently, one of my clients asked me to create an encrypted zip file. I tried PowerShell. In this PowerShell tutorial, I will show you how to create a password-protected zip file using PowerShell. To create a password-protected zip file in PowerShell, you can use the Compress-Archive cmdlet combined with a third-party tool like 7-Zip. Here’s an example … Read more

How to Split Large Text Files with PowerShell?

Split Large Text Files with PowerShell

When working with large text files, it can be necessary to split them into smaller files. This is a common requirement while working with log files. PowerShell provides different commands and methods to divide these types of large files. In this tutorial, we’ll explore different methods to split large text files using PowerShell. To split … Read more

How to Check if a File is Empty with PowerShell?

Check if a File is Empty with PowerShell

Are you looking to check if a file is empty or not in PowerShell? In this PowerShell tutorial, I will show you different methods to check if a file is empty with PowerShell. To check if a file is empty in PowerShell, you can use the Get-Item cmdlet to retrieve the file’s properties without loading its content. … Read more

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

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

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