Refactored Codes
How to clear contents or empty contents or delete contents of a file, without deleting the file, in windows, using powershell

To empty or delete the contents of a file. You can use Clear-Content command, and provide path to the log file.

Clear-Content -Path .\Test.log

You can also use Set-Content to clear contents of a text file. By setting the content to an empty string.

Set-Content -path .\Test.log -Value ""

You can use New-Item command with -Force argument to delete content

New-Item -ItemType File -Name Test.log -Force Screenshot of Admin Dashboard

Just testing some markdown works