The easiest way would be to add the option of no parameter so that:

$State = SetConsole()

would simply return the current state without changing it. This would leave it backward compatible.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.