I have sqlcmd.exe
from both SQLServer 2008 and SQLServer 2012:
PS C:\\> Get-Command sqlcmd.exe
Definition
----------
C:\\Program Files\\Microsof
Got this from a couple other sources, seems to work so far.
JBs Powershell
and
How can I run PowerShell with the .NET 4 runtime?
Another way of making PowerShell and LocalDB play nice is to make PowerShell aware of DOTNET 4.0.3. This can be done by creating a file called "powershell.exe.config" in the C:\Windows\System32\WindowsPowerShell\v1.0 . The file should contain the following:
Be aware that this not an officially supported way of using PowerShell, so it might break other stuff ...