Powershell Increment Variable In Function Sql