I have the sqlserver module imported into Powershell Get-Module result
ModuleType Version Name
ExportedCommands
Manifest 21.0.17099 sqlserver
{Add-RoleMember, Add-SqlAvailabilityDatabase, Add-
SqlAvailabilityGroupListenerStaticIp...
Script 0.0 SqlServer
However I still recieve the following error when trying to use Invoke-sqlcmd:
Invoke-Sqlcmd
Invoke-Sqlcmd : Could not load file or assembly
'Microsoft.SqlServer.BatchParser.dll' or one of its dependencies.
The specified module could not
be found.
I have tried re-importing the module and it imports successfully but it still errors out when attempting to use this. Intellisense is even detecting the module's cmdlets