June 21, 2012 at 7:33 am
Comments posted to this topic are about the item Stairway to SQL PowerShell Level 1: SQL PowerShell Basics
August 8, 2012 at 1:17 am
I think I will follow this series. It makes it look all very simple. And I'm curious to see what you can do with it in regards to SQL Server.
Just one minor omission: you make reference to Fig 1.3 but the figure is not pesent.
August 8, 2012 at 6:53 am
Thanks. I have submitted to have the graphic re-added to the level.
August 8, 2012 at 8:37 am
Thank you, the timing for this couldn't have been better as I'm looking into Powershell now, it's an area I've been avoiding too busy to concentrate on 🙂 Thanks for the stairway, I'll be following the series.
I'm also finding Sean McCown 's videos to be very useful, he's got a fair few demos online on using Powershell, from basic stuff to more detailed SQL Server uses. http://midnightdba.itbookworm.com/AllVids.aspx, search for 'Powershell'.
---
Note to developers:Want to get the best help? Click here https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help (Jeff Moden)
My blog: http://uksqldba.blogspot.com
Visit http://www.DerekColley.co.uk to find out more about me.
August 8, 2012 at 8:44 am
Thanks.
I will be posting some videos related to my stairway at my youtube channel http://www.youtube.com/dbaduck and at http://dbaduck.com as well.
I know Sean and have seen his videos.
There will be more levels posted soon.
August 8, 2012 at 9:10 am
Thanks for the nice series. I wanted to learn this since a long time. I think that time has arrived now.
I tried the examples in this first article. Everything worked fine except at the end, when I tried to edit profile. Notepad just informed me that path doesn't exist and didn't give me any option to create new file. What should I do?
I am using Win7 and running PowerShell as administrator.
Thanks.
August 8, 2012 at 9:20 am
You should be able to from a PowerShell window run the following and then do the notepad $profile thing.
New-Item $profile -force -type File
notepad $profile
August 8, 2012 at 9:54 am
After fixing a few typos, I was able to get the expected result.Thanks.
One think I noticed is that, in the profile script, $Host.Name is appended twice. I guess it was an oversight.
Thanks again.
August 8, 2012 at 10:17 am
I will see about getting the example changed to not be redundant.
Glad things worked out.
August 8, 2012 at 10:44 am
I noticed this, too. I played around a bit trying to get the version (major & minor) included in the title as described and arrived at this:
$wintitle = $CurrentUser.Name + " " + $Host.Name + " " + $Host.Version.Major + "." + $Host.Version.Minor
August 8, 2012 at 11:02 am
William,
I tried adding version as you mentioned and it worked. Thanks.
August 8, 2012 at 12:47 pm
Good post 🙂
I would've loved it if you could have covered the profiles also as part of the introduction as it becomes an integral part of the whole experience.
August 8, 2012 at 12:51 pm
Thanks.
Sorry for the brief coverage of profiles. There is a more in depth profile discussion later in the Stairway, so hopefully it will help more later.
August 8, 2012 at 2:40 pm
I don't seem to be able to open file in notepad.
PS C:\Users\rhassan> $profile
C:\Users\rhassan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
PS C:\Users\rhassan> notepad $profile
I keep on getting the error that path does not exist. I tried to browse to it and still same issue.
Has anyone seen this
Thanks!
August 8, 2012 at 2:45 pm
dbaduck (8/8/2012)
You should be able to from a PowerShell window run the following and then do the notepad $profile thing.New-Item $profile -force -type File
notepad $profile
Here is the statements to get this done for you.
Viewing 15 posts - 1 through 15 (of 38 total)
You must be logged in to reply to this topic. Login to reply