PS
Powershell Tutorial Online

Use Powershell to Delete File

Using PowerShell commnads to delete a file


    # Using PowerShell commnads to delete a file
    Remove-Item -Path "C:\test\FirstCreateFile.txt"
    


You can also use wildcard '*' characters to remove multiple items. For example, this command removes all the files in C:\test:


# Using PowerShell commnads to delete all file
Remove-Item -Path "C:\test\*.*"
 

Here also you can use -Force command to delete files force fully

# Using PowerShell commnads to delete all file force fully
Remove-Item -Path "C:\test\*.*" -Force
 

Here also ypou can use -Force command to delete files force fully

# Using PowerShell commnads to delete all file and folders
Remove-Item -Path "C:\test\*.*" -recurse

Delete-SharePoint-Files-With-PowerShell