PowerShell has a current location for each PSDrive it knows about. Some of these are not even filesystems. [System.Environment]::CurrentDirectory gets the current directory for the powershell.exe process rather than the current PSDrive's location.
Using Get-Location only fixes part of the problem because it depends on the currently selected PSDrive. What is the path to your script if by some reason you are called from HKLM:\Software\Microsoft? Using Get-Location or Resolve-Path will likely result in something similar to HKLM:\Software\Microsoft\Script.sql which is clearly wrong. If your powershell script and script.sql exist in C:\Temp\Scripts but they user is currently in C:\Users\username, then using Get-Location will still not find the script because it results in C:\Users\username\script.sql.