Im trying to check if a process is running but get an error when checking which i dont want the users of my script to see, anyone know how i do this correctly ?
if ((Get-Process 'WinWord') -eq $False){
Write-Host "Please close all instances of Microsoft Word before running this report."
exit
}
Thanks
if ((Get-Process 'WinWord') -eq $False){
Write-Host "Please close all instances of Microsoft Word before running this report."
exit
}
Thanks