Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I cannot use Set-Location to change to a database. I have loaded the SQL Server snapins. I can use Set-Location to get to SQL\Localhost\SQLEXPRESS\, and I can show the paths under the server node with Get-ChildItem. However, if I try to change to a known database on my machine, the Set-Location call fails.

Powershell path not found

Am I missing a library?

share|improve this question
up vote 4 down vote accepted

Finally found the answer on MSDN Social here. It's not enough to simply load the PowerShell plugins. You have a few more commands that also need to be run. (Solution source.)

cd $sqlpsPath
Add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin SqlServerProviderSnapin100
Update-TypeData -PrependPath SQLProvider.Types.ps1xml 
update-FormatData -prependpath SQLProvider.Format.ps1xml 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.