Ok i’m at a loss >.> I have tried try/catch and trap function and it’s wont catch this error…
# Adjustable Variables
$Computers_Path = ".\Compuers.txt"
$Log_Path = ".\Log.txt"
# Script Specific Variables
# Validate Adjustable Variables
TRAP { Write-Host "Unable to locate list of computer names at $Computers_Path"; Continue; }
$Computers = Get-Content $Computers_Path
Try this:
this lets the
trapcatch the exception.