Add begin block and server connection code
Add begin block and server connection code

Added in missing server connection code, missing begin block. Moved code
better suited to begin block from top of the process block.

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