Get AD site name on Locked Down XP System

Everyone on the web seemed to point to

nltest /dsgetsite

Found myself on a locked down XP system needing to get this programmatically and came up with the below

Not fast but it works reliably to date

set cmd="gpresult | findstr /B /C:"Site Name:""
for /f "tokens=3" %%G IN (' %cmd% ') DO set location=%%G
echo %location%
Posted in Tip at September 19th, 2013. No Comments.

Google Glass

Views on the future of the platform by myself on

Direct Article Link

Posted in Uncategorized at February 26th, 2013. No Comments.

Server Moved

Finally Migrated this domain to TurnKey Internet

Posted in Uncategorized at August 9th, 2012. No Comments.

TurnKey Internet – Dedicated Hosting – Part 1

Over the years i have been using multiple different web hosts, lately i have grown beyond the help been using shared hosting and for about a year i have been using a VPS from however as my entrepreneurial ambitions grow i find myself needing more server capacity. After hearing a few rave reviews from my good friend Stuart Ryan I decided to give TurnKey Internet a go.

I have dealt with multiple hosting providers, from personal/small business hosting to multi-tier architecture ISO 27001 grade enterprise managed hosting solution running financial applications for some of the largest national and international financial institutions.

For this i am going to try a new review structure, i am going to review the service over 30 days.

Day 0 – Ordering

The ordering process went fairly straight forward, not the fanciest ordering system in the word but it defiantly gets the job done, Every major option can be specified from operating system with a verity of control panel choices to Managed backups and business continuity insurance. The only one thing i found strange was i didn’t get an order confirmation email.

TurnKey Internet Sign Up Page

Day 1 – Setup

About 12 hours into the 72 hour setup window i had an email sitting in my inbox with notification of my server setup, complete with full list of all the details for the extra IP address blocks i ordered. From this point on there were one or two problems

  1. The Root password i specified for my server was sent in plain text in my email, This is kind of akin to sending a pin number for a new credit card to someone on a post card. This seems to be a standard these days for services like this, either a warning that the password would be sent in plain text or some sort of random generated password would have been nicer but this is pretty standard these days.
  2. As the server i specified had a fair chunk of CPU and memory i went for the VMware ESX option. While i did get the latest major version ESX 5.0 it was one major update behind the latest version a minor hiccup but worth noting, this is a fairly easily thing i could do yourself but a bit of a pain none the less
  3. The serer itself has VT support that allows a Hypervisor to support 64Bit Operating systems, however this wasn’t enabled by default. Its a common mistake to make, most servers to date i have dealt with in the last 12-18 months come with this option enabled by default. This is a good opportunity to try the support.

Day 1 – Support

The support portal is pretty well integrated into the customer portal, the support from is basic but comprehensive form, but not to the point that you often find with such systems where there are endless compulsory fields that always seem to get in the way.

For the support team it was around 9pm on Saturday, however 47 minutes later the the ticket had been upgraded to a Level 3 Tech and was asking permission to reboot the server to enable the BIOS option i requested. It took a bit of back and forth and two reboots to get the problem solved but 1 hour and 36 minutes i was installing two 64 Bit Debian Servers.

Things Missing

I feel a service like this is missing a good DNS service, since Every DNS has gotten a little harder. Linode offers a fantastic free DNS service, i feel myself missing this service all ready, while i can always run my own DNS service, i prefer to have it manged by someone else. for now i still have most of my services running on linode until i can find a better way to sort out my DNS.


Over all, the service i have gotten is fantastic, good prices, speedy implementation and unbelievable service, so far i can see my list of services with TurnKey Internet expanding in the future.

Posted in Review at April 2nd, 2012. No Comments.

Subversion 1.7 Debian

Update: Confirmed that this process works on svn 1.7.3 and 1.7.4, Works well on Debian Lenny (5.0) so if you have problems and your running Etch (4.0) or older please try and upgrade

At the time of writing Subversion 1.7.x wasn’t in the Debian Apt tree, and as i wanted to use the new HTTPv2 access method i decided to try my hand at building it from source.

I started with a bare bones Debian 6.0.3 box, the only non standard package i installed was ssh.

First off lets let apt-get do all the hard work when it comes to solving the dependencies for building SVN 1.7, we also may as well install Apache2 at this point. I have also added vim as its my text editor of choice for CLI

apt-get update
apt-get build-dep subversion subversion-tools libapache2-svn
apt-get install apache2 vim

Be warned, for me i needed 477 (432mb) packages to this may take awhile to get and install

From here, lets use wget to grab the latest source package, the latest version should aways be listed on the Source Downloads on the Subversion website. at time of writing this is 1.7.1


Once this is done extract and install like any other package

tar xxf subversion-1.7.1.tar.gz
cd subversion-1.7.1
make install

Now if our like me you plan to use Apache2 need to copy the modules to the appropriate dir

cp ./subversion/mod_dav_svn/.libs/ /usr/lib/apache2/modules/
cp ./subversion/mod_authz_svn/.libs/ /usr/lib/apache2/modules/

Now to build a few config files, i prefer vim for my CLI text editing so i’m going to install it now, feel free to

touch /etc/apache2/mods-available/dav_svn.conf
vim /etc/apache2/mods-available/dav_svn.load

Simple config just copy and paste the text below

# Depends: dav
LoadModule dav_svn_module /usr/lib/apache2/modules/
LoadModule authz_svn_module /usr/lib/apache2/modules/

Now lets enable the module and restart apache

a2enmod dav_svn
/etc/init.d/apache2 restart

If you don’t get any errors, Chances everything is installed and configured correctly, you can always use the –version switch on svn or svnadmin to confrim

svnadmin --version

So its installed, but lets setup a quick and dirty test repo to confrim that apache is working

mkdir /var/svn/
svnadmin create /var/svn/test
chown -R www-data:www-data /var/svn/test/
vim /etc/apache2/conf.d/svn_test

Config for /etc/apache2/conf.d/svn_test

<Location /svn>
        DAV svn
        SVNPath /var/svn/test

Restart Apache then you should be good to go

/etc/init.d/apache2 restart

Now browse to http://your_server/svn and you should see a screen similar to the one below

What you should see in your browser

From here you have the worlds most basic SVN server setup, no restrictions or limitations but if your just installing something on your local pc/network this may be enough for you, I plan to follow this up with a post about how i migrated 200gb 300,000+ revision corporate repo from my old 1.6.x server to my new 1.7.1 server

Posted in Guide at October 28th, 2011. 7 Comments.

PowerShell Get AD Password Age

Wanted to be able confirm that a user had really changed their Active Directory password when they claimed they had, Powershell was easy enough, but took me a bit to find it

get-ADuser -Identity administrator -Properties |FT PasswordLastSet

or if you just want all the properties of the user, drop the pipe to filter

get-ADuser -Identity administrator -Properties *
Posted in Tip at October 25th, 2011. No Comments.

XenDesktop 5.5 Second Hard Drive

So running my first Citrix XenDesktop 5.5 Deployment, Did the pilot and the design on 5.0 SP1 but when 5.5 came out the first day i saw no reason not to jump straight to 5.5. As i work for a software development company the requirements for developer are quite high so we took some careful consideration when designing the environment as one must when every user us utalising their own Oracle or MS SQL Database plus some JBoss and Eclipse thrown in for good measure.

Long story short we split up the system to a C: and a D: drive for OS and installs respectively, All well and good, nothing in any of the citrix design guides i read saying this wasent possable? XenDesktop just links into VMware and esentially clones the VM right? Wrong! think its best summed up by the one line i got from Citrix support

The Machine Creation Service will always recognise only the first drive, if you require desktops with multiple drives you would work around the MCS by using PVS to stream disks, use partitioning, or manually add disks after MCS has deployed the VM’s.

Thanks Citrix…..

Posted in Rant at September 6th, 2011. No Comments.

VTP Cisco Nexus 5020

There’s alot of talk about the Nexus OS not supporting VTP and where it does its only on the 7K series ant it only supports transparent mode. This is a bit out of date.

Once little thing i found after a moderate ammount of digging it is fully supported in the 5.x series of NX-OS, Namely Cisco NX-OS Release 5.0(2)N2(1)

Version Info

  kickstart: version 5.0(3)N2(1)
  system:    version 5.0(3)N2(1)

All modes supported

sydnexus01(config)# vtp mode ?
  client       Set the device to client mode
  off          Set the device to off mode
  server       Set the device to server mode
  transparent  Set the device to transparent mode

Generic Config

switch# config t
switch(config)# feature vtp
switch(config)# vtp mode client
switch(config)# vt accountingin cisco
switch(config)# vtp version 2
Posted in Tip at June 30th, 2011. No Comments.

Limit Apache Bandwith Debian

Install and Enable the mod

apt-get install libapache2-mod-bw
a2enmod bw

Apply config to vhost

<VirtualHost *:80>

# Enable BW Module
BandwidthModule On

# Force for Every Request
ForceBandWidthModule On

# Limit to 200kb/s
Bandwidth all 204800

#rest of your config
DocumentRoot /var/www/


Restart Apache

/etc/ini.d apache2 restart
Posted in Guide at February 3rd, 2010. No Comments.

Site Upgrades

Upgraded from Highlight Source Pro to CodeColorer as one of the latest updates fixed a bug where it didn’t like my theme. Also upgraded to the latest WordPress Version

Shouldn’t cause any problems but if someone gets a mangled page let me know

Posted in Uncategorized at July 22nd, 2009. No Comments.