You are currently browsing the archive for the Windows category.

I recently discovered something which I wish I’d found years ago!  Have you ever been in the situation that you need some information regarding a certain Active Directory user or group but you don’t have access to the Active Directory Users and Computers MMC snap-in?  Read on!

The Good Old NET Command

Remember this one?  You may already have seen it in its net use form to create a mapped network drive.  Net use has even gotten a Wikipedia page dedicated to it.  But use is not its only use!

Options of the net command

Let’s look into a couple more interesting uses of this oldie.

Getting User Account Info

As you can see in the screenshot below, you can get some details on an AD user account by running the following command:

net user <account_name> /domain

The output:

Using "net user" to find AD account info

Recently I had a suspicion that a certain account at work was locked out because our nightly job crashed with a weird error.  Using this command I was indeed able to tell that the account was locked.  Can always be interesting to find out first before waking up the local sysadmin.

When an account is locked, the Account active setting will say Locked instead of Yes.

What’s also interesting here is that list of Global Group Memberships.  If you’re experiencing security issues because a certain account does not seem to have access to something while the sysadmin has ensured you that it has been added to the appropriate groups, here’s your quick way to find out for sure!

Getting AD Group Details

The following command can be used to get a list of everyone who’s part of a certain AD group:

net group <group_name /domain

The output looks like this (yes, I’ve hidden the aliases of my colleagues):

Using the "net group" command to find who belongs to the group

Again, practical when you’re troubleshooting security issues.

Stopping And Starting Services

The following command can be used to stop a service on the local machine:

net stop <service_name>

Replace “stop” with “start” to start it again.

Please note: you’ll need to run the DOS box as administrator for this to work.

Here’s me restarting my SSIS 2008 service:

Using "net stop" and "net start" to manipulate local Windows services

Can be useful to create a batch script to stop/start all you SQL Server services on your development PC, especially if you’ve got several versions installed and want all resource available to the one currently in use.  That way you can quickly switch between versions and still keep resources available for other tasks.

In case you’re not sure what the service is called, open up the list (Start > Run > service.msc > enter), double-click your service and have a look at the Service name property:

Finding out the name of a service

Finding the name of your computer

The next command can be used to find the name or your PC, plus some other details:

net config workstation

The output:

Using "net config workstation" to get your computer's name

But I actually use another really simple command for that:


Use "hostname" to get the name of your machine

Yep, as simple as that, hostname prints the name of your PC.


That’s it for this one, a couple of good uses of the long-forgotten net command.

Have fun!




For months now I’ve been getting annoyed by occasional drops of my network connection on my Windows 7 64-bit laptop.  I couldn’t really attach the problem to a specific action and the event logs were of not much use either, which is why it took me so long to get it fixed.  But now I finally seem to have found a solution.

The Issue Description

Let me first describe the issue a bit.  While working on my PC I noticed that I lost internet connectivity.  The Internet Access icon would show a yellow triangle with an exclamation mark inside it – the Warning sign.  Right-clicking that icon (indicated with the red circle in the screenshot below) shows Troubleshoot problems as one of the options.  I tried that option several times in a hope to get the issue fixed.  Unfortunately this did not result in a working connection, and neither did it give me an explanation of what was going on.


The only working solution was a full reboot.  In the cases where I first tried to solve the problem through the Troubleshoot problems option I would find the network adapter to be disabled after the reboot, needing a manual activation.

Obviously this was a situation which I wasn’t planning to keep.  Especially as the connection also drops while I’m downloading software through my Technet subscription (thank you PASS Conference!!).  So a couple of days ago I decided to search the internet for a solution.  And I seem to have found one!

The Solution

I have changed two different settings on my network adapter.  Since doing that I haven’t lost my connection anymore.  Now the problem is that I don’t know if both these settings need to be modified in order to get the issue solved.  I will explain both of them but I think just one of them is really needed.  As I don’t want to take a chance to mess up my connectivity again, I’ll leave it up to you to try it out (post a comment with the result!).

Internet Protocol version 6

The first setting that was modified is the IPv6 support on my network adapter.  It was enabled and I disabled it.

To get to that setting, use the following click sequence: Start > Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings > right-click your network adapter and choose Properties.

In the Networking tab you’ll find an option called Internet Protocol version 6 (TCP/IPv6).  Uncheck the checkbox to disable it.

I don’t really think that this was the setting that I needed to fix the problem.  I think the following did the trick.

Don’t close the Properties window just yet.

Allow computer to disable network device – or not

On the Local Area Connection Properties screen you’ll notice a button called Configure….

Local Area Connection Properties

Click that one to open up more properties of your network adapter.  One of the tabs is called Power Management, open that one.

One of the options on that window is called Allow the computer to turn off this device to save power.  This was enabled by default.  I disabled it.

Advanced Network Adapter Properties

And I think that’s what solved my issue.  At least, it seems more logical.  During longer downloads I can imagine that the driver thinks that there’s not activity (although that would be a bug to me then), so it goes on and disables the device – while it is actually still in use.

Anyway, time to leave on holiday!  I’ve got a couple of articles coming up soon, but first time to have some fun with the family.  See you soon!




We’ve finally gotten a built-in tool in Windows to capture those screenshots for blogging/documentation/whatever purposes.  And it has been given the magical, oh-so-logical name of Snipping Tool!

Update: I’m aware that Vista already contained this tool.  But I’m one of those guys who managed to stay away from Vista so to me it’s new :-)

Let’s see if I can capture what it looks like by using the tool itself.  Hmm, I can’t…  Which is probably quite logical as it shouldn’t get in the way when you want to capture a screenshot of something.  What you want to see then is anything but the actual tool used to do it, right??

I’ll go for the old-fashioned way then: ALT + Print Screen (it captures the active window).

Windows 7 Snipping Tool - Capture those screens!

In that screenshot I’ve demonstrated a couple of its features.  It comes with a Pen that you can customize a bit into several colors and thickness.  You’ve also got a marker tool called Highlighter – that’s the yellow part.  And there’s an Eraser tool to remove any markings or pen editions you’ve made previously.

Another feature that’s not shown but that’s really useful is that the screenshots are automatically copied to the clipboard.  But you can switch that off through the options if you don’t like it.

Snipping Tool Options

I would have hoped that a couple more features had been included, such as the ability to draw arrows without needing to use a freehand tool (as shown in screenshot above), and a Rectangle/Ellipse tool for some extra markings.

Anyway, what this means as far as I am concerned is that I no longer need to install my favorite screen capture tool (I’ve used a couple over the years but the last one was Screen Hunter).  But for editing some screen captures I’ll still need to resort to my favorite image editor (

Where is it located? Well, Start Button > Snipping Tool.  At least, that’s where I found it in my Windows 7 Enterprise edition.

What’s the hotkey? It’s CTRL + Print Screen.

How do you use the hotkey?? From the moment that you start up the application, it wants to make a screen capture.  What this means is that your mouse pointer changes into a crosshair whenever it goes outside the Snipping Tool window.  All you now need to do is hit the ESC button.  Then switch to the application that you’d like to capture, possibly opening up a menu.  With everything in place just as you want it captured, hit CTRL + Print Screen.  There’s your crosshair again.

Have fun!




Owkay, I’ve got a good one for you this time.

And all it takes is checking a checkbox, just one checkbox!

That’s the solution to a problem with which I’ve been struggling yesterday.  What problem?  Let me tell you.

I’ve been installing Master Data Services (MDS) on my SQL Server 2008 R2.  This feature will not only create a database but also a website which you can use to manage MDS.  And it’s the website part that I had a problem with.  Everything installed just fine but when I tried to load the site in Internet Explorer 8 on my Windows 7 64-bit machine, I got the following error:

HTTP Error 401.2 – Unauthorized

You are not authorized to view this page due to invalid authentication headers.

Great, an authentication problem – aren’t those our favorite ones?  And like any decent developer, I didn’t waste my time reading all the text on the error page and started investigating the issue.  I had a look at the settings of the Application Pool and those of the Default Web Site.  I also tried changing the security settings in IE.  At the end I think I have tried every possible setting in IIS 7.5 (which is the version that ships with Windows 7), but I kept getting that same error.

I let some time pass (not on purpose but because we were going to visit my parents-in-law) and in the evening I decided to have another look.  This time I took the effort of reading everything mentioned in the error:

HTTP Error 401.2 - Unauthorized

Do you see that blue link down at the bottom, which I’ve marked with a red rectangle?  That’s where I got the answer from!  Clicking it opened up the following Microsoft Support page: Error message when you try to visit a Web page that is hosted on IIS 7.0: "HTTP Error 401.2 – Unauthorized".

Sounds familiar doesn’t it?  Okay, it’s meant for IIS 7.0 but works for 7.5 as well.

I solved my problem by applying Resolution 1.  In short: IIS was running without the Windows Authentication module installed!  Apparently that is not installed by default when you activate Internet Information Services through the “Turn Windows features on or off” window.  Here’s a screenshot showing what needs to be added:

Activating Windows Authentication for IIS 7.5 in Windows 7

Once that was set up I was able to load the MDS application:

Master Data Services Home Page

If you’re looking for instructions on how to install and configure Master Data Services, have a look at this article at the Master Data Services Team blog.

(Do I need to mention that this was the first-ever web application that I tried running on Windows 7? :-) )

Have fun!



Tags: , , , , ,

This is an old one but I keep needing it every once in a while.  Every time when I start using a new machine running Windows XP to be precise.  So I thought I’d post it here so next time I don’t need to spend five minutes looking to find the right page.

Recently I needed to find all SSIS packages that were using a particular view and I performed a Windows Search on all .dtsx files in my project’s folder, searching for the view’s name.  And it didn’t give me any results even though I knew there were a couple of packages that were using it.  Is the search broken?

And then I remembered: no, it’s not broken.  Let’s just say that XP’s default settings are not ideal for developers (or power users in general I’d say).  By default XP does not search all file types!  And it’s a feature, not a bug!

Anyway, luckily the “fix” is not that complicated.  My preferred way of fixing this is Method 2 in this Microsoft Support article: Using the “A word or phrase in the file” search criterion may not work.

Interesting to know, this is not a feature in Windows XP only, Windows Server 2003 got it as well.



« Older entries

© 2008-2019 BI: Beer Intelligence? All Rights Reserved