Fix sqlps command by passing variable as parameter and using -Command.