No SQL Server PowerShell snapin installed despite installing SQL Server -
i using sql server 2012 sp1 developer edition. lately had need use sql server snapin powershell claims not have one. made research on internet didn't find working solution. there way can add powershell?
get-pssnapin -registered
output:
name : commonsnapin psversion : 2.0 description : common snapin name : configurationsnapin psversion : 2.0 description : configuration snapin name : definitionsnapin psversion : 2.0 description : definition snapin name : dynoportalsnapin psversion : 2.0 description : dynoportal snapin name : folderssnapin psversion : 2.0 description : folders snapin name : journalsnapin psversion : 2.0 description : journal snapin name : membershipsnapin psversion : 2.0 description : membership snapin name : metadatasnapin psversion : 2.0 description : metadata snapin name : notificationsnapin psversion : 2.0 description : notification snapin name : persistencesnapin psversion : 2.0 description : foundation persistence snapin name : reportingsnapin psversion : 2.0 description : reporting snapin
add-pssnapin sqlservercmdletsnapin100
output:
ps c:\users\crdm , secure 3> add-pssnapin sqlservercmdletsnapin100 add-pssnapin : windows powershell snap-in 'sqlservercmdletsnapin100' not installed on computer. @ line:1 char:1 + add-pssnapin sqlservercmdletsnapin100 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : invalidargument: (sqlservercmdletsnapin100:string) [add-pssnapin], psargumentexception + fullyqualifiederrorid : addpssnapinread,microsoft.powershell.commands.addpssnapincommand
in sql server 2012 powershell functionality delivered product came in form of powershell module, therefore no longer need work snapins.
to consume sql server powershell module, need this:
import-module "sqlps"
or if using powershell v3+ need reference member of module , it'll automatically loaded in.
Comments
Post a Comment