Restart-Computer (with BitLocker Suspended)

Create a function called Restart-Computer. Use it to call the Restart-Computer cmdlet. Before you call the cmdlet, suspend bitlocker protection so you don't get password-pestered at boot time...

 

 
function Restart-Computer {

    Suspend-BitLocker -MountPoint "C:" -RebootCount 1
    Microsoft.PowerShell.Management\Restart-Computer

}

 
Why does this work?
 
There are rules for command precedence...
 

capture205

 
These rules determine which command to run when there is more than one command with the same name. And... if the same type of command with the same name exists, PowerShell runs the command that was added to the session most recently.