touch equivalent windows powershell code example

Example 1: touch in windows powershell

touch in linux == ni in powershell
//ni is alias of New-Item
so you just need : 
ni newFile.txt

Example 2: touch command in windows

ECHO text>file1.txt

Example 3: touch in windows powershell

in powershell not cmd 
you can use 
#-------------------
ni itemname
#------------------
ni is alias for New-Item, type help New-Item for the documentation
thanks

Example 4: touch command in windows

type nul > .gitignore ---This creates empty file and works on windows 10.