Converting SQL cmdlets to use SM.NET library