Read with touch in Powershell using functions
Try creating the below function in powershell
function touch{ ni $args }
ni -> New-Item | if ni doesnt yeild an ans try New-Item instead
which works perfectly
Now you can try out touch as in the image below to create files


But does this mean that you would have to create a function every time you need to use?? Well, not at all my friendos
there is a better way around that. All you have to do is to add it to a powershell profile.
You open your powershell profile with the following command
notepad $profile
All you need to do now is to add the above function to this file and save it. Now close all the powershell that you have open and reopen them.This time the function gets loaded when powershell starts and it works globally which means any instance of powershell can use it now.
a better advanced implementation of touch can be found here thanks to @mklement0