Would you like to learn how to create files with specific sizes using Powershell? In this tutorial, we are going to show you how to use Powershell to generate a Dummy file of specific size on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Create a file with specific size

Start a Powershell command-line.

Start Powershell

Create a file of specific size.

Copy to Clipboard

Valid units of measure.

Copy to Clipboard

Verify the size of the created file.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we created a file of 5 Mb.

Congratulations! You are able to create files with a specific size using Powershell.

Tutorial Powershell - Create multiple files with specific size

Start a Powershell command-line.

Start Powershell

Create multiple files with a specific size.

Copy to Clipboard

Valid units of measure.

Copy to Clipboard

Verify the size of the created files.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we created 10 files of 5 Mb.

Congratulations! You are able to create multiple files with a specific size using Powershell.