April 15, 2011 at 2:49 pm
Hi,
I have Installed Powershell 2.0 on Windows 2003 server and I have an sql server 2005 instance it.
I have opened the powershell command prompt and typed sqlps
but getting below error:
The term 'sqlps' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:6
+ sqlps <<<<
+ CategoryInfo : ObjectNotFound: (sqlps:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
and tried to add PSsnapin as below:
PS C:\ Add-PSSnapin SqlServerCmdletSnapin
But getting below error:
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
At line:1 char:13
+ Add-PSSnapin <<<< SqlServerCmdletSnapin
+ CategoryInfo : InvalidArgument: (SqlServerCmdletSnapin:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
PS C:\> Get-PSSnapin
Name : Microsoft.PowerShell.Diagnostics
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains Windows Eventing and Performance Counter cmdlets.
Name : Microsoft.WSMan.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Get-WSManInstance and Set-WSManInstance) that
re used by the Windows PowerShell host to manage WSMan operations.
Name : Microsoft.PowerShell.Core
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.
Name : Microsoft.PowerShell.Utility
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains utility Cmdlets used to manipulate data.
Name : Microsoft.PowerShell.Host
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Start-Transcript and Stop-Transcript) that ar
provided for use with the Windows PowerShell console host.
Name : Microsoft.PowerShell.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.
Name : Microsoft.PowerShell.Security
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets to manage Windows PowerShell security.
Please advice.
April 15, 2011 at 2:55 pm
SQL Server PowerShell (sqlps) only comes with SQL Server 2008+
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
April 15, 2011 at 3:30 pm
So that means we can not use Powershell 2.0 for SQL Server 2005 on Windows 2003 servers?
What are the sanp-ins we need add for SQL Server 2005?
The way we add for SQL Server 2008 as below
Add-PSSnapin SqlServerProviderSnapin100
Add-PSSnapin SqlServerCmdletSnapin100
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply