powershell create file and directory code example Example: powershell create file and directory New-Item -Path '.\hello\test\file.txt' -ItemType File -Force