Tag Archives: windows

Piping Command Line output to clipboard

Piping output of applications is nothing new to those in the profession of IT (especially the *nix administrators out there) but there was a feature added to Windows 7/Server 2008 R2 that doesn’t seem to be widespread.

Any command that you enter at the Command Line prompt or CMD as we all know it as can be piped to the Windows clipboard with a simple argument. All you need to do is at | clip to your command.

For example, let’s pipe a list of power plans using powercfg to the clipboard:

powercfg -list | clip

The output of this looks like the below:


Notice how there is…no output.

Now let’s head into notepad and paste what is on the clipboard:


Hey presto, all the output from the command that would have displayed at the CMD prompt was piped into the clipboard and now into whatever output of your choosing (in this case, Notepad).

Fellow SysAdmin’s know what to do


Cheers to fellow redditors for the find

Windows 8.1 & Server 2012 R2 release dates announced


If you have been hanging out for the latest release of Windows for either your home computer or your server farms the wait is almost over.

Microsoft have set the date, October 18th (for those in Australia & NZ, 17th for those in the States and everywhere else) for the general release. Please note, RTM availability is usually before general availability, so for those of us with the dead man walking TechNet subscriptions expect downloads to be made available earlier.

Windows 8.1 (as well as RT), despite Microsoft ditching the traditional release followed by several service packs cycle, will be released for free for those who already own Windows 8.

Windows Server 2012 R2 will be released through traditional channels and feature along side refreshed versions of System Center and Windows Intune as part of the dubbed R2 wave update.

Discover more about the Windows 8.1 release here and the 2012 R2 here

Make time to set (NTP) time

Any any Windows domain environment one of the most overlooked but ultimately crippling when things are wrong component is time. If your Domain Controllers, other servers and clients are not in sync with one and another you’re going to have a bad time.

Yes I just went there, internet memes and all…

So what are the best methods for keeping things in sync. Windows does a good job of keeping everyone in sync with your nearest Domain Controllers but if your Domain Controllers are getting their time from different sources or are muddled up possibly due to virtualization that is when you will start to get grief.

I recommend doing two things:

Set an external network time source

Go to your Primary Domain Controller and type the following at an elevated command prompt:

w32tm /config /manualpeerlist:"timeserveraddress.com" /syncfromflags:manual /reliable:yes /update

Where timeserveraddress.com is replace with your favourite reliable NTP server. If you don’t have one in mind a good place to start is http://www.pool.ntp.org and pick a server that is closest to you geographically.

Once set, let’s confirm our command has worked by typing the following at an elevated command prompt:

w32tm /query /peers

You should receive an output similar to the following:

Once you have confirmed the external time source is set the next move is to get the rest of your ducks (Domain Controllers) in a row.

Set your Primary Domain Controller as the time source for the other Domain Controllers

Do the following at an elevated command prompt on the rest of your Domain Controllers:

net time \\primarydomaincontroller /set

Where \\primarydomaincontroller is replace with the NETBIOS name of your Primary Domain Controller that was just setup with an external network time source.

That’s it, all done. Your clients will look to their nearest Domain Controller for their time and those Domain Controllers will get their time from the Primary Domain Controller which will get the time from your choice of external time source.

Note: this setup is just a recommendation. You can switch things up to increase redundancy as the current setup has two single point of failures (external time source and Primary Domain Controller). To increase redundancy simply point your additional Domain Controllers to the same external time source (or different ones if you want SUPER redundancy but I don’t recommend this as it could introduce error rather than prevent it) rather than your Primary Domain Controller

Certified Part 1

Microsoft Certified Professional LogoAs of yesterday I am now a Microsoft Certified Professional (Technology Specialist: Windows 7, Configuration for those keeping score at home).

For a long time I flirted with the idea of getting certified for all kinds of things but never put in the time to get it done. The biggest barrier is I am not much of a big reader of anything in text-book form (and is most likely why I never did as well as I should in Physics and Math Methods back in my VCE days). So while I wanted the title it just never came about.

That was a few years ago and since then I have under gone a change in mindset when it comes to all things life. I began personal training after gathering with friends and realising we all wanted more from ourselves. This began a chain of events that ultimately resulted in me being more confident in myself, more willing to take risks, more willing to put myself outside my comfort zone and most importantly hungry to be the best I can possibly be.

I cannot stress how important that pushing my body in personal training is to being a better me (or you). It isn’t purely about physical appearance or strength (that’s a great bonus). Some people may write off this kind of thing as macho or neanderthal but that is half the point. Our day-to-day lives (especially for people in IT) are simply boring for the body, yet our body was designed from the outset to move, to be physical. Without this being satisfied, our body as a whole is working to nowhere near its peak. If we want to train our brain to be more intelligent it will be quite a struggle if the body is in poor shape as they are both connected intricately. In short, just like it has always been stressed to have a balanced diet of food, so too should you have a balanced regiment of training the body and the mind.

Fast forward to the start of June and I am on Long Service Leave from my current job and rather than take a holiday I decided to help out a start-up based in Hong Kong that develops golf training and analysis devices that I (and many of my close friends) am invested in. I helped out where I could, doing things like soldering, assembly work, social media marketing and many other tasks no way in relation to my career in IT.

So how does this relate to becoming certified you ask? Well, around mid August, the work I could get involved with was starting to dry up. It is at this time that I started to review my resume with job prospects being discussed, I found that while my 7 years of experience is phenomenal at my age and is invaluable I couldn’t help but want something more on my resume…something to give it a bit of polish. My mind wandered back to certifications and I had a eureka moment that I could use all this free time to study with the possibility of earning that industry title.

Excited by the prospect I started to research what I could achieve with the limited resources I had at my disposal and my current experience. When I released there was a testing centre 10 minutes away from my current location and it was more than %50 cheaper here in Hong Kong than back in Australia the seed was planted.

In the next part I will share what resources I used to achieve my certification and more musings over the entire process.

“svchost.exe is using a lot of my CPU. Is this a virus?”

A common occurrence I find is that svchost.exe is often mistaken for a virus or some form of malware because it is often listed in Task Manager utilizing a percentage of CPU time. And while some virii are named something similar to svchost.exe to stop the user from thinking otherwise 99% the user simply doesn’t understand what it is.

Microsoft describes the svchost.exe as

…a generic host process name for services that run from dynamic-link libraries (DLLs).

At startup, Svchost.exe checks the services part of the registry to construct a list of services that it must load. Multiple instances of Svchost.exe can run at the same time. Each Svchost.exe session can contain a grouping of services. Therefore, separate services can run, depending on how and where Svchost.exe is started. This grouping of services allows for better control and easier debugging.

So, in a nutshell, svchost.exe is a container for services that run via DLL files.

Great, but when a user is trying to diagnose what is eating CPU cycles it masks what is really going on. What can one do to remove the wool over their eyes and find out what is truly going on?

It’s rather simple. Drop to command prompt and run the following command:

tasklist /svc /fi "imagename eq svchost.exe"

You will be presented with a list similar to the one below:

tasklist output

Conveniently the tasklist command breaks down each instance of svchost.exe, lists the PID (use this to track it in Task Manager) and what services are running via it.

I was able to use the above command recently to find Windows Defender service was still running despite the installation of Symantec Endpoint Protection and thus was chewing CPU cycles.

Hopefully, it will come in handy for you to. Let me know in the comments section or on Twitter if it does!