Powershell Increment Variable In Function In Sql