I have sqlcmd.exe from both SQLServer 2008 and SQLServer 2012:
sqlcmd.exe
PS C:\\> Get-Command sqlcmd.exe Definition ---------- C:\\Program Files\\Microsof
I'm guessing that invoke-sqlcmd doesn't know what "(localdb)" is. Try using localhost instead.