Maximo's profileMax - Put It TogetherPhotosBlogListsMore ![]() | Help |
Microsoft Community Sites
Most valuable resource links
|
Max - Put It TogetherJuly 04 Virtual Varia Blog: More PowerShell in R2 tricksTake a look at this blog about using Powershell in Windows Server R2 virtualization environment. This is good stuff, Click here: (Virtual Varia : More PowerShell in R2 tricks) :) July 03 Executing SQLPS scripts from your SQLPS/PowerShell WindowI’ve seen many good SQLPS scripts on the internet but they asked you to copy/paste the code into the prompt. Then during my “PowerShell and SQL Server” presentation, I realized there’s a better way to stop doing copy/pasting code. I already got it saved to my scripts folder and the only thing I need to do is running from the SQLPS prompt. So, how can we do this? I – From SQL Server Management Studio 1. At the SQLPS prompt, Type the location of your Script Repository: 2. Now you can type the Script name and press enter. You can use the “tab expansion” to auto filled your script name. II - Run “SQLPS” from within PowerShell Windows 1. Open Windows PowerShell Console prompt, then run SQLPS.exe or 2. Use the WindowsPowerShell user profile to include SQLPS.exe at the end of the script. The following SQLPS script will create a table Employee in a NewDB database. Keep in mind, that while doing using SQLPS.exe within Windows PowerShell, you do have two processes running. So, next time you download your next SQLPS scripts, forget copy/paste into the SQLPS prompt, save the file, and run it from your scripts folder. I guarantee you will have a better user experience with SQLPS. By the way, have you notice that at the end of the script, we end up with a long directory name. Well, here’s a short PowerShell script to make it better:
Now, because this is a PowerShell function, we need to running in a different way. We use the dot source method to execute functions in our PowerShell script:
Hope you find this information useful so you can enjoy working with both PowerShell and SQLPS. Here’s some additional resource link on SQPS scripts and SQL Server PowerShell community extensions: 1. Sethu’s Blog: http://blogs.msdn.com/sethus/default.aspx 2. Chad Miller Blog: http://chadwickmiller.spaces.live.com/default.aspx 3. Chad Miller, SQL Server PowerShell Extensions: http://sqlpsx.codeplex.com/ Have fun!! July 02 Want to know how many PowerShell MVP’s in the world??We are a total of 35 MVPs in the world. Check the Microsoft site for more information on how to become an MVP. :)
June 25 Microsoft TechNet, MSDN, and some other learning resources…Here’s some good Microsoft learning resources and can help you stay up-to-date with new technologies:
1. Windows 7 Feature Walkthroughs: http://technet.microsoft.com/en-us/windows/dd320282.aspx 2. TechNet “Microsoft – How Do I? Videos”: http://technet.microsoft.com/en-us/cc138021.aspx 3. MSDN “Learn” section: http://msdn.microsoft.com/en-us/bb188199.aspx 4. RAMP UP – Microsoft Developers community based learning program: http://msdn.microsoft.com/en-us/rampup/default.aspx 5. THRIVE Program: http://www.microsoft.com/click/thrive/ 6. Microsoft Webcast Calendar: http://www.microsoft.com/events/webcasts/calendar/monthview.aspx Don’t forget to support your TechNet and MSDN quarterly meetings in your area when available. And, take advantage of this information that mostly is free to view. Enjoy!! June 25th 2009 – So Florida SQL User Group – PowerShell and SQL Server presentation…Tonight I will be presenting PowerShell and SQL Server bring in some samples. There will be giveaways you don’t want to miss. Also, you can download my presentation which includes supporting documents and all the PowerShell script samples. During this presentation will be covering using SMO and SQLPS to manage your SQL Server. Location: DeVry University - SQL Server User Group Meeting, ROOM 254, 2300 SW 145th Ave., Miramar, FL Please click in the following link: () |
|||||||||||||||||||||||||||||||||
|
|