Category: Exception handling in PowerShell

Exception or Error handling in PowerShell -Try/Catch/Finally Block Example

 4,375 total views,  36 views today

 4,375 total views,  36 views today   In this post I will show that how we can handle the exception in PowerShell coding using the try/catch/finally block and how we can write the error or exception message into the log file.   Exception handling using try/catch/finally block PowerShell example: cls $fileName = “File_Uploading_Report” $enddate = (Get-Date).tostring(“yyyyMMddhhmmss”) $logFileName

Continue reading