Setting time limits on Media Center Extenders#

One of the good things in terms of fiddling about with the Extenders is that they use Windows user accounts to run each devices session under (MCX1-5 for each device). This has been useful as it allows you to use logon scripts to allow the extenders session access to network resources.

 

 

 

This also means that you can set allowed time Windows unique to each extender using the the ‘net user’ command as you can for any other account. You can see the details on the syntax of this on my XP site at http://mvps.org/marksxp/WindowsXP/userhours.php

 

If someone tries to start up an extender which has had its logon hours limited, they won’t actually be told they’ve been blocked. A more generic, ‘There was a problem contacting the Media Center PC’ message will appear.

 

Unfortunately net accounts /forcelogoff does not appear to be effective against an extender session, so forcing the session to end when the time expires isn’t that simple. A very dirty method of kicking off your extenders would be to setup a time limit, copy the following into a .cmd file and setup a scheduled task event to run the cmd file at the time you want.

 

tsdiscon 1 /v

tsdiscon 2 /v

tsdiscon 3 /v

tsdiscon 4 /v

tsdiscon 5 /v

tsdiscon 6 /v

 

However doing blanket in the dark disconnects, isn’t a particularly good idea if you have more than one extender. This makes no distinction between Extenders, or PC remote desktop sessions. If the session is holding the lucky number, it gets booted. If you want to be a little more precise over what you disconnect, the console command ‘Qwinsta’ allows you to see all sessions active on the local machine. You could match the Extender username to a session ID and disconnect it by typing in tsdiscon x /v (where x is the session id), but that would have to be done manually since things can move around depending on what’s going on.

5/18/2005 10:21:30 PM UTC #     |  Trackback

 

All content © 2008, Mark Salloway