I have SQL Server Express 2012 and SQL Server 2017 Advanced.
I was able to get the SQL Server 2017 to start the PowerShell command.
I cannot get SQL Server 2012 to run the Start SQL Server command.
I was able to do this oreviously but not now.
I see the SQLPS in the Binn file but I get the following error:
import-module : Could not load file or assembly ‘file:///C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShe
ll\Modules\SQLPS\Microsoft.SqlServer.Management.PSSnapins.dll’ or one of its dependencies. This assembly is built by a
runtime newer than the currently loaded runtime and cannot be loaded.
At line:1 char:14
- import-module <<<< SQLPS -DisableNameChecking
- CategoryInfo : NotSpecified: ( [Import-Module], BadImageFormatException
- FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand