This post is part of the series on PowerShell Snippets.
The following PowerShell command will check if the named file exists in the current directory and, if so, delete it (replace the highlighted section with the name of the file to be deleted):
$FileName = "azrcrv-smtp.zip"
if (Test-Path $FileName) {
Remove-Item $FileName
}
Click to show/hide the PowerShell Snippets Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.