Forum Discussion
CS_HelpDesk
3 years agoGoTo Contributor
Remote Execution - PowerShell Script Repository
Welcome to the Remote Execution - Powershell Script Repository!
What is it? A library of scripts to help you execute automated tasks and manage your Central computers without having to access t...
CS_HelpDesk
3 years agoGoTo Contributor
To delete a file.
---
$filePath = $null
if (Test-Path -Path $filePath -PathType Leaf)
{
Remove-Item $filePath -Force
}
else
{
Write-error -Message "$filePath doesn't exist" -Category InvalidArgument
}