Thank you for that Allen. I had already created a shutdown script, although its not as fancy as yours. But as it works, I will leave it for the moment, as I have other parts of the script to get working. But I have copied the code and will test it when I have time in a few weeks. Thank you.