Powershell Create A Function In Sql