Comments posted to this topic are about the item Stairway to SQL PowerShell Level 2: SQL PowerShell Setup and Config
Very informative articles. Thank you for sharing!
There is a minor error that threw me for a bit of a loop. In listing 2.3, you mention the code to load the Extended SMO assembly is:
This did not work for me. I read a bit further, and noticed in Listing 2.4, the code is this:
Listing 2.3 has an extra period between "Smo" and "Extended". Removing it allowed me to get the desired output.
Thanks. I will submit a change.
Great set of articles. I am really enjoying working through them.
Is it just me or are these articles from the future?!?!? Level 2 is dated the 15th Aug 2012 and Level 3 is dated the 29th!
Hall of Fame
Someone got their hands on a delorean.
I think it just means that I am a really good author 🙂
Hello guys!!! The article is very good. I have little to no understanding on the subject of PowerShell. I would like begining to learn the ropes. However, I can not find the PowerShell folder in my Programs Menu. I have Windows XP SP3 installed, and I am running with a non-administrator user. Can you help me in any way ?
Thanks in advance.
Ariel, if you go to the previous Level in this stairway you will see where you can get PowerShell for WinXP SP3. In the table there it shows that there is no native PowerShell in WinXP, so use the link in the Level 1 to go and get it and install it.
Then you can go to the Level 2 and start to play.
I read the Level 1 part, and I understood that PowerShell does not install nativelly in Windows XP. But my Windows XP box has Microsoft SQL Server 2008 R2 installed. For it to be installed one of the requirements is PowerShell 2.0, so I had to install it first. Could it be that the installer does not put a shortcut to the program in the Menu Folder ? Am I missing something else ?
Thanks for the very fast answer.
It's under Start/All Programs/Accessories/Windows PowerShell
I have SS2008 Express and don't seem to recall that PS 2.0 was needed for the installation.
I installed PS 2.0 using the download shown in the Level 1 article.
Exactly what kind of syntax is this SQLSERVER:\SQL\localhost\default?
I can understand that in place of 'localhost' you can put the computer name and in place of 'default' you can put the instance name. But what exactly is the 'SQLSERVER:\SQL' part? How can it vary?
This even works pointed to a SS 2005 and SS 2000 installation. Neat!
And I discovered the right click by pure chance which is the equivalent of PASTE. Neat!
I really appreciated the article. It took me a little bit to get the last few examples to work, but it was only because I was using "localhost" rather than my machine's name/instance. Once I got that sorted, I had success with all of it. I look forward to future steps.
SQLSERVER:\SQL is a PSDrive and path.
If you use Get-PSDrive you will see that there is a SQLSERVER: drive and SQL is a path under SQL Server.
You can see which paths you have access to in the drive by using:
You will see that SQL is the path for the SQL database engine, and there are more.
Hi all, I'm having a little bit of a problem with one of the command lines erroring out and I am not sure why. When I try:
"$server = Get-Item SQLSERVER:\SQL\localhost\default"
I get several lines of the same error:
"WARNING: Could not obtain SQL Server Service information. An attempt to connect
to WMI on 'localhost' failed with the following error: An exception occurred
in SMO while trying to manage a service. --> Failed to retrieve data for this"
Any clue why? Any help appreciated. P.S. When I try using the SMO, instead of using the provider, all is fine and dandy.
This is due to not having Administrative privileges on the machine you are going against. So on the remote machine you have to be able do administrative things so being in the BUILTIN\Administrators group. And on the local machine, the Powershell window being run in Adminstrator Mode (right click and choose Run As Administrator).
Let me know if that does not help, but I have seen that error message because of these issues.
Viewing 15 posts - 1 through 15 (of 32 total)