SamCogan.com

Archive for the ‘Windows’ Category

Renew an SSL certificate in IIS using the existing key

Wednesday, August 4th, 2010


I recently needed to renew an SSL certificate on an IIS 7 server. The usual method to do so would be to generate a renewal CSR on the server, go to the SSL provider and generate a certificate, simple. However in this case I was presented with a renewed certificate that had been created using the CSR that had been used to generate the original certificate, so how do I get this into IIS, I can just add it to my certificate store, as the machine doesn’t believe it has the private key for this cert.

The certifcate managment console has an option to renew a cert with an exisiting key, great I though, but this just gives an error about a template.

So, after some research I found a way to deal with this situation, so that I can assign the private key from the old cert, to this cert and therfore use it in IIS.

1. Open up the Certificate Services MMC, and connect to the local computer store

2. Import the new certificate into the Local Computer Personal store.

3. Export the “old” certificate including the private key do NOT set the option to delete the private key on success!

4. Delete the “old” certificate in the MMC

5. Get the the serial number from the new certificate and run this command from an elevated cmd prompt:

certutil –repairstore my “put serial here”

5. Assign the new certificate to the IIS website

Once that is done, the certificate works perfectly, without having to generate a new CSR. Thanks to Andreas Klein for his blog post that lead me to this solution

Tags:
Posted in Windows, sysadmin | No Comments »


How Windows Home Server made my life easier

Monday, December 7th, 2009


Like most good geeks, I like to experiment with new technology at home. I have a pretty intricate home network and enjoy adding new things to it and playing with new products. My partner, who also has to share this house, however does not. She doesn’t appreciate it when her files get moved about to accommodate my new SAN, or she has to run some other program to backup her laptop, or has to change the way she gets films off the network and onto the TV.

My partners a teacher and so has limited requirements for the home network – backup her files, let her get on the internet and be able to stream media to the TV, preferably without her having to think about it. I needed something that would do this that would remain constant and let her get on with her stuff, so she doesn’t need to get annoyed with me.

Yes, I could have put together a complicated solution using Windows Server, maybe some sort of network backup, or Acronis solution etc but I thought I’d first take a look at Windows Home Server, which should do everything I need for me. So I setup a new VM, and set it installing. I was dubious at first, there’s been a lot of negative press about WHS, however once it was installed it took me about half an hour to get it configured and start backing up the home machines.

I’m impressed with WHS, it’s primary function of backing up the home PC’s works great, it’ll bring machines out of sleep at night, run a backup and put them back to sleep. I had an occasion a few weeks ago where I needed to restore, I just burned a restore boot CD, booted the PC and connected it to the home server and ran the restore, an hour later the image was restore and the PC was back to normal.

The plugin architecture for WHS is one if its best features. You can get plugins that will do most things you need on your home network. I’m using PS3 Media Server to stream to my PS3, the inbuilt media server will stream using DLNA, however the PS3 won’t play all codecs, so the PS3 plugin encodes the files on the fly so they’ll play properly. I’m using a Jungledisk plugin to ensure all my data is backed up offsite to Amazon S3, the twitter plugin to notify me of any network problems and there are many more plugins i’m going to be looking at.

The biggest benefit of WHS is that it just works. I can just leave it running, assured that backups are working, and it will tell me if there is a problem. It deals with sharing all our files we need on the network and media streaming and so I can just forget about it, and get on with testing Exchange 2010, without disturbing anyone else’s work.

Tags: ,
Posted in Windows, sysadmin | No Comments »


The Death March of Windows XP

Tuesday, May 5th, 2009


This week I encountered something that I feel was a sign of the beggining of the end of XP as a mainstream OS.

I like XP, its solid, quick and doesn’t try and tell me what to do, unlike some OS’s we know and I’m sure it will be around as a useful OS for a while yet. However I think the problem I encountered signals the beginning of the end for its mainstream use.

My housemates laptop died the other day and he needed it for an important presentation of an application he had written, in 3 days time. So he went out and bought a brand new Acer laptop, which , you guessed it, came with Vista pre-installed.

We installed his app and proceeded to test it. It was slow, dog slow. Unusable for this demonstration. We know it worked in XP on his old laptop, and this one was much more powerful, so lets install XP, that should solve it. We bunged in the XP disk started the setup and away we went. Except we didn’t, it blue screened.

I know this blue screen, I’ve seen it many times before, on servers where I’m installing the OS and it needs drivers supplying for the Hard Disk controller, but I’ve never had to do it on a desktop OS (except my RAID card, but that’s expected). So here we are, we don’t have the controller drivers for XP, they weren’t supplied, but more importantly we don’t have a floppy drive to use to install them, as that’s what the driver loader in the setup application needs. So we had to abandon the install.

This is the problem, these new machines are coming with disk controllers that work fine with Vista, but XP doesn’t know what they are. Couple this with the lack of floppy drives in most new machines and you know most standard users are never going to find a way to install XP.

So even if you can convince the hardware supplier to give you a copy of XP, the progress of today’s hardware is going to start preventing the practical installation of XP. It may just be the odd machine now, but give it a year, and most new machines will be incapable of installing XP without drivers and a floppy drive, and users aren’t going to do that. And that’s why I feel XP is beginning its march to the grave.

Tags:
Posted in Windows | 1 Comment »


Windows 7 on a Macbook Pro

Thursday, January 15th, 2009


So I decided today was the day to install Windows 7 on my Bootcamp partition. I’ve been having issues with Office not running on my Vista install and then today Visual Studio starting having errors, so the easiest solution was a re-install.

Installation of Windows was exactly the same as the Vista install, bar a few logo changes. Took about 45 minutes, so not bad at all. Once installed, I popped in the Leopard CD, it ran setup and installed the drivers, and done, no drivers missing, no conflicts, all done.

While it does look very similar to Vista, it does have a few obvious changes, the new superbar replaces the standard startmenu and is graphically pleasing if nothing else. I’ve not had allot of time on it yet, but it does seem to be noticeably quicker than Vista, the opening of windows seems snappier.

I’ve installed most of the software I need and had very few issues. I did initialy had a problem getting an application for mounting ISO images to work, magic ISO didn’t work, nor did ISO burn, but in the end I managed to get SlySoft’s clone drive to work, but that only installed after I disabled system restore. Other than that, so far no issues. Will update if any issues come up.

Posted in Windows | 1 Comment »


Moving Organizational Units in powershell

Monday, January 12th, 2009


It turns out that whilst you can happily create a new mailbox in any OU you want, you cannot then move it to a different OU using the set-mailbox command. In fact what you have to do, is move the base Active Directory object. To do this you need to know (or work out) the distinguished name of both the user you are trying to move, and the OU you are trying to move it to. You then use the MoveTo method of the PSBase Object to move it. The code to do this looks like this:

</span>

<span> "$from=[ADSI] 'LDAP://&lt;DIstinguisedNameOfUser&gt;'"</span>

<span>"$to=[ADSI] 'LDAP://'&lt;DistinguisedNameofOUToMoveTo&gt;"</span>

<span> "$from.PSBase.MoveTo($to)"</span>

<span>

On a side not. The PSBase object, basically gives you access to the underlying Powershell Object, not the specialised version for a user, mailbox etc. A good explanation is available here.

http://blogs.msdn.com/powershell/archive/2006/11/24/what-s-up-with-psbase-psextended-psadapted-and-psobject.aspx

Tags: ,
Posted in University, Windows | No Comments »


RDP to Console change with SP3

Sunday, October 5th, 2008


The ability to RDP to a servers console is great, it stops you getting locked out of a server when you leave too many sessions open! For some reason MS have decided to change the command in RDP 6.1, which is included in XP sp3. So after much confusion as to why it kept telling me there were too many sessions, i discovered that the /console switch, has now changed to /admin. So the command is now

mstsc /v:serverIP /admin

Tags: ,
Posted in Windows | 1 Comment »