Made Changes to the function
Made Changes to the function

Removed the LoadTemplate as it seemed not useful. Changed the write-messages in verbose to make it better understood. Removed the ValidateSet so that it would be checked in the Begin.

sqlpadawan/dbatools,alevyinroc/dbatools,wsmelton/dbatools,Splaxi/dbatools,SirCaptainMitch/dbatools,kozloski/dbatools,dsolodow/dbatools