This one also ought to go on the PowerShellScripting.com/scripts (not to say that you shouldn't put it here, just that it looks useful, and will have a better audience there -- especially as we've got some improvements in mind for the script repository, and we'll be bringing the existing scripts over.
My main suggestion would be to move from the huge scriptblock to having another function.
If you take like 118 and 119 and change them from this:
$Check_If_Boot_Required = {
to this:
function Test-BootRequired { PROCESS {
and then close it with two }} on line 169 ...
Then I believe you can rewrite line 182 to be more efficient, and clearer, as well. Of course, you can invoke the scriptblock directly too (just like the function) -- if you put the PROCESS{...} around your code in your scriptblock, you could just pipe
Import-CSV $inputFile| &$Check_If_Boot_Required
-- but I think it's generally a better idea to store your scriptblocks in the function provider instead of in the variable provider. Your line would end up like this:
Import-Csv $InputFile | Test-BootRequired
By the way, does this send an email regardless of whether a reboot has been performed? I haven't run it yet...