PowerShell - Error Handling
What is wrong with this error logging approach?
try { Remove-Item 'C:\file.txt' } catch { Write-Output "Error: $_" > 'error.log' }try { Remove-Item 'C:\file.txt' } catch { Write-Output "Error: $_" > 'error.log' }15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions