Closed zjalexander closed 7 years ago
I feel like adding something like this to the beginning of the Start-DSCEAscan function should accomplish what you are asking
if($MofFile -notlike '*.mof') {
Write-Error "Please review your MofFile parameter, a full file path to a MOF file was not detected. Ex. -MofFile C:\Users\username\Documents\DSCEA\localhost.mof"
return
}
else {
#Begin DSCEA Engine
..................................
}
Adding Keith Hitchcock to get his thoughts
This should be resolved in the next release
....Please don't ask how I stumbled into this situation, but if you put a directory path into -MofFile instead of a, um, ...file.... You get an error about Access Denied. Please throw a more descriptive error in this case, like "Path must be a file and not a directory".