I'm running the following command (smallest reproducible example I could come up with):
Invoke-Sqlcmd "select * from sys.databases" | %{
Invoke-Sqlcmd "select 1"
}
I'm getting the following error:
Invoke-Sqlcmd : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "pipeline.resources" was correctly embedded or linked into assembly "System.Management.Automation" at compile time, or that all the satellite assemblies required are loadable and fully signed. At line:1 char:1 + Invoke-Sqlcmd "select * from sys.databases" | %{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (:) [Invoke-Sqlcmd], MissingManifestResourceException + FullyQualifiedErrorId : ExecutionFailed,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Tired this:
- both with ISE and command line
- both elevated ("run as administrator") and not
- against SQL 2012 and SQL 2008
- from a Windows 8 and from Server 2008
In all cases the result is the same.
Why and how to diagnose?