Creating new file through Windows Powershell

JR Sahoo.'JS' picture JR Sahoo.'JS' · Aug 1, 2017 · Viewed 96.9k times · Source

I have googled for the below question, but could not find any answer. Can someone help me on this; What is the command to create a new file through Windows Powershell?

Answer

J. D. picture J. D. · Aug 1, 2017

I'm guessing you're trying to create a text file?

New-Item c:\scripts\new_file.txt -type file

Where "C:\scripts\new_file.txt" is the fully qualified path including the file name and extension.

Taken from TechNet article