Complete the code to remove the file named 'test.txt'.
Remove-Item [1]The Remove-Item cmdlet requires the path to the item as a string, so the file name must be in quotes.
Complete the code to remove all '.log' files in the current directory.
Remove-Item [1]The wildcard pattern '*.log' matches all files ending with '.log'.
Fix the error in the code to remove the directory 'Logs' and all its contents.
Remove-Item -Path 'Logs' [1]
The -Recurse parameter tells PowerShell to remove the directory and all its contents.
Fill both blanks to remove all hidden files in the 'Temp' folder.
Remove-Item -Path 'Temp\*' [1] [2]
-Force allows removal of hidden files, and -Hidden filters to only hidden files.
Fill all three blanks to remove all '.tmp' files in 'C:\Data' and its subfolders, showing progress.
Remove-Item -Path 'C:\Data\*.tmp' [1] [2] [3]
-Recurse removes files in subfolders, -Verbose shows progress, and -Force removes read-only or hidden files.