Hi LucD
Much appreciate your assistance.
Prior to posting my last post I did make sure that my session was not idle, and it never was showing as idle. Well not in VI client anyway. However, I've tested your script and it works, kind of. Well it actually does terminate all sessions that have been idle for specified or greater period of time but it also terminates my active session.
Not much of a biggie as I'm intending to run the script with a service account which than should get around the issue.
Cheers