July 17, 2010 at 7:38 pm
I am trying to get up and running with Powershell but keep running in to small problems and not sure where to turn. It is really cool from what I've used of it but everything has to be set up just right for it to work. I'm following the Wrox book "SQL Server 2008 Administration with Powershell", and I'm to the point where I'm trying to get some stuff set up in my environment. Whenever I connect to SQL from a Windows Powershell session I cannot get very far. If I try to set the location to Databases as shown below I get the message below.
PS SQLSERVER:\sql\winpart\default> sl databases
Set-Location : Cannot find path 'SQLSERVER:\sql\winpart\default\databases' beca
use it does not exist.
But if I'm in SMSS and right click somewhere and start a powershell session I can browse all over the place. I have done this on three different computers, any idea on what I'm doing wrong? Also, is this the best place for Powershell questions? Thanks.
July 18, 2010 at 9:08 am
To be able to use SQL Server functionality in a normal powershell session, you have to include the powershell provider for SQL Server.
http://msdn.microsoft.com/en-us/library/cc281962.aspx
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply