CMD Master
Back to Blog
•Arnošt Havelka

Create Files in PowerShell

Learn to create new files with New-Item.

Start Interactive Lesson
Create Files in PowerShell

The New-Item command creates new files and directories. Master this essential skill for file management.

Creating Files

Try the command

Create a new file!

Build the command
New-Item[arguments]
New-Item
Terminal
PS C:\Users\Student>New-Item -Path test.txt -ItemType File

File Creation Examples

Terminal
documents.txt
PS C:\Users\Student\Documents\CreateDemo>ls

Knowledge Check

1 / 1

What flag creates a file?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Create Directories in PowerShell

Build directory structures with New-Item.