Windows 7 workstation POSH 3.0 SS 2012 SP1
Abstract:
Developer 1 cannot run Invoke-SQLCmd
Developer 2 with similar SS Client tools installation can run Invoke-SQLCmd
Developer 1 cannot run Import-Module SQLPS
When I try to run a query from my laptop like the following:
Invoke-sqlcmd -ServerInstance <ServerName> -Query "Select top 10 * from <SomeTable>;"
I get the following error:
Invoke-sqlcmd : The 'Invoke-sqlcmd' command was found in the module 'SQLPS',
but the module could not be loaded. For more information, run 'Import-Module
SQLPS'.
Yet another developer can successfully run the command, and we both have a local
I cannot run Import-Module sqlps on my machine for obvious reasons - ExecutionPolicy is Restricted.
I am not sure why the other developers machine allows the query, while mine does not. Is this a SQL Client install issue?
Get-Module –ListAvailable -name SQLPS
– AutomatedOrder