Blog
Fun with PowerShell: How to get SQL Server information
Friday, August 27
posted by James Kehr
While I like the SQL Server PowerShell provider I have two issues with it. First, it’s kind of limited, and second, it only installs with 2008 versions of SQL Server. For these reasons I prefer to use the good old fashion SQL Server SMO namespace to do my dirty work. That and we have a lot of SQL Server 2005 in our environment.
http://msdn.microsoft.com/en-us/library/ms162169.aspx
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.aspx
Digging around in the SQL Server SMO, Server namespace, I noticed there was this lovely “Information” property list and thought, “I bet I could do something pretty cool with that.” Now when I say cool, I mean cool in the I’m-a-geek definition of the word, not in the I-was-cool-and-popular-in-high-school version of the word. And so I wrote a nifty little program, which can easily be turned into a function, that pulls all your basic SQL Server information from a system.
SQL Server Compact 4.0, the Next Gen Embedded Database from Microsoft
Tuesday, August 24
posted by Brad Kingsley
Have you heard about SQL Server Compact 4 yet?
From Microsoft's site: "Microsoft SQL Server Compact 4.0 is the next generation of embedded database from the SQL Server family, and brings all of its goodness to the world of ASP.NET web application development. SQL Server Compact 4.0 will provide an easy and simple to use database storage for starter websites, and the features of Compact that wooed the mobile devices and desktop developers will now be available to the ASP.NET web application developers. In addition, the features and enhancements in SQL Server Compact 4.0 like the new Transact-SQL syntax for OFFSET & FETCH, higher reliability, seamless migration of schema and data to the higher SKUs of SQL Server, support for code-first & server generated keys in ADO.NET Entity Framework 4.0, and the ability to use Visual Studio 2010 to develop ASP.NET web applications for Compact 4.0 etc. will also excite the existing development community."
Check out the SQL Server team's blog for additional information:
Happy hosting!
Troubleshooting Outlook 2010 Restarts
Friday, August 20
posted by Rick Barber
I have been running Outlook 2010 since it first came out and for the most part I've been pretty happy with it. Since I first started using it, though, I have had an issue with it. Apparently out of the blue it would sometimes crash (usually right in the middle of writing an important email) forcing Outlook to restart.
I spent some time researching this, and it appears that the crashes are most often caused by Outlook Add-Ins. After looking at Event Viewer, that is the next place I would look.
Go to File -> Options. That will bring up the Outlook Options window. Click on Add-Ins in the lower left-hand menu. That will list all the Add-ins that you have installed with Outlook.
The next step I would recommend is removing all of the Add-ins and then start adding them back one by one over time to narrow down what is causing the issue. To disable one or more Add-ins, at the bottom of the Outlook Options window on the Add-in Options page select 'COM Add-ins' beside Manage: and click the Go... button. That will bring up the COM Add-Ins window where you can uncheck Add-ins that you want to disable.
In my case the 'Send to Bluetooth' Add-in was causing the issue. once I disabled that I haven't had Outlook crash on me yet.
I hope this helps if you are experiencing the same issue that I was having.
iSSD and other small things
Thursday, August 19
posted by James Kehr
I picked this up from Engadget today and thought it was worthy enough to break my PowerShell blogging obsession long enough to blog about my real technology passion: hardware.
The iSSD is a new boot drive from SanDisk. The iSSD is a postage stamp sized—for those old enough to remember postage stamps—solid state drive (SSD) that is soldered to the motherboard instead of inserted into a MiniPCI slot or SATA drive bay. This is not a new idea, simply a better implementation of an old concept.
Sizes range from 4GB to 64GB and boast speeds up to 160 MB/sec seq. read and 100 MB/sec seq. write. Not the fastest thing in the world, but plenty fast for a boot drive.
These little guys should do wonders for the tablet and ultra-slim notebook markets. Devices like the iPad help get their small size from soldering the NAND flash directly to the motherboard. The iSSD takes it a step further by providing a simple, all-in-one package that should make adding tiny boot storage to the motherboard cheap and easy for everyone. Yay competition!
#James Kehr
Get-Member $OW | ?{$_.title -eq "System Administrator"`
-and $_.certification -contains 'MCITP:SA 2008, MCSE 2000, MCDST, Network+, A+'}
New-Variable -name company -value 'ORCS Web, Inc.' -description ‘www.orcsweb.com | 1.888.313.9421’
Fun with PowerShell: Hyper-V Virtual Machine details
Wednesday, August 11
posted by James Kehr
Before I begin I will make a full confession. This code isn’t actually mine. Not really. I chopped most of it out of the PowerShell Management Library for Hyper-V.
Why would I do such a thing? I generally dislike calling external files in my PowerShell scripts. Not always, but most of the time. The more external files you have the harder it is to make a script highly portable, and, under most circumstances, scripts should be highly portable with as few external dependencies as possible. And so I ripped out Get-VM from hyperv.ps1 and turned it into a self-standing function called getVmDetails.
Introducing the Advanced Virtual PC Controls for Windows 7
Tuesday, August 10
posted by James Kehr
Last year I got a nice gift from Microsoft for attending TechEd in the form of a TechNet subscription. After receiving my activation code I promptly upset my ISP by downloading everything I could get my hands on. It was enough that I’m honestly shocked I didn’t get a call or get turned off. Among those downloads was a product I had toyed with in the past but never really gotten in to, Windows Home Server (WHS).
For those not familiar with WHS it’s basically Miscrosoft’s home backup tool based off the Windows Server 2003 SBS operating system. It includes the ability to backup your home computers, store shared files, stream audio/video, remote control your home machines from the Internet, and much more. I had never really played with it before because I lacked the spare change to buy the necessary hardware. Enter virtualization…
Saving perfmon templates in Windows Server 2008 [R2], Vista and 7
Tuesday, August 3
posted by James Kehr
Managed Windows Server Performance Tip
Here is a great tip for someone looking to review some performance information on their managed Windows dedicated server or Windows Cloud server. Also, don't forget that included in our Complete Care Managed Services (CCMS) is enhanced monitoring and even personal system and data reviews by your Microsoft Certified support team.
There is a slight change in the way perfmon (the lovingly short way of saying Windows Performance Monitor) templates work once you leave the XP/2003 domain. In the old days Microsoft likes to put everything in these hard to dissect, custom bin files that you couldn't easily, or at all, modify without the aid of the Microsoft application. Luckily they are leaving that model behind for one that is open and easy for administrators to automate with. Enter the XML Dragon.
Perfmon in Windows Server 2008 [R2], Vista and 7 now uses easy to edit XML templates to store custom made templates. To change the template simply edit the document in your XML editor of choice, mine is UltraEdit, then create a new data collection set with your custom template.
I'm not going to re-invent the wheel here, so if you are not familiar with creating manual/custom data collector sets, or perfmon in general, please check out this very detailed TechNet article: http://technet.microsoft.com/en-us/library/cc749249.aspx. Once you are done creating your set simply right-click on the set and select Save Template... from the menu. Now it's time for a beautiful snippet with a wonderfully drawn red arrow pointing out the location on the menu, for those visual learners among us.

My art skills are awesome, I know.
As you save the template you may noticed the file type is a simple old .XML file. As long as you don't mess with the structure you can edit the XML data to your heart's content.
In one scenario, load testing a six node webfarm with two SQL servers, I was able to setup all eight data collector sets in just a few minutes by creating a master template, making a copy for each server, opening the XML in UltraEdit (Notepad works well too), and using the replace text tool to change the server name. Save and create a new data collector set from a template for each server and done. I even wrote a few PowerShell lines start and stop the collectors.
$collectors = "DataCollectorSet01","DataCollectorSet02","DataCollectorSet03", ... (and so on until all the data collector set names are listed)
To mass start the collectors:
foreach ($collector in $collectors) {logman start $collector}
To mass stop:
foreach ($collector in $collectors) {logman stop $collector}
Easy as can be. Drop me a comment if you have any questions.
To find out more about our solutions, check out the links below our contact us at sales@orcsweb.com.
Managed Windows Dedicated Server Hosting
Managed Windows Cloud Server Hosting
Managed Shared Windows Hosting












