To create a new file in CMD, navigate to your desired directory and execute echo.> filename.ext, where filename.ext is the name and extension of your new file. This creates a file with minimal content. In PowerShell, the command New-Item filename.ext -ItemType "file" creates a new file in the current directory. Replace filename.ext with the intended name and extension of your file.