Jump to content

Starting Terminal Services Sessions from the server


Recommended Posts

Guest decksta
Posted

Is it possible to start terminal services sessions from the local server via

startup scripts?

 

I would like to have say 8 users on a server and when that server boots, a

script starts a terminal services session for each user. Those user sessions

would then have their own set of startup scripts to run applications (in this

case for UI testing).

 

Is this possible?

 

Thanks in advance.

Guest sen_ismail@web.de
Posted

Re: Starting Terminal Services Sessions from the server

 

Hi,

no this is not possible!!! And why?

You could only make scripts on Clients to connect via RDP and on the

Server you could make startup scripts to start apps.

 

cheers,

 

Ismail

Guest Soo Kuan Teo [MSFT]
Posted

Re: Starting Terminal Services Sessions from the server

 

If I understand correctly, you want to be able to automate the creation of

Terminal Services session with different user accouts.

If you're using Win2k3 Terminal Services, you can try this to see if it

works for you:

In your programs/scripts:

1. Use TSWMI Win32_TSLogonSetting to set autologon to user1. Make sure

PromptForPassword property is set to 0.

2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe /v:servername".

A new User1 TS session will be created. If you have startup script, it

should be running within the session

3. Use TSWMI Win32_TSLogonSetting to set autologon to User2. wait a few

seconds

4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe /v:servername".

A new User2 TS session will be created. it should be running within the

session

5. repeat step1 and 2 with your user account as many time as you need.

 

If you want to allow a single user account to have multiple session, you can

set this property with Win32_TerminalServiceSetting.SetSingleSession Method

 

Thanks

Soo Kuan

 

For more info on TSWMI, please visit:

http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services-_2800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

 

 

 

--

This posting is provided "AS IS" with no warranties, and confers no rights.

 

"decksta" <decksta@discussions.microsoft.com> wrote in message

news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

> Is it possible to start terminal services sessions from the local server

> via

> startup scripts?

>

> I would like to have say 8 users on a server and when that server boots, a

> script starts a terminal services session for each user. Those user

> sessions

> would then have their own set of startup scripts to run applications (in

> this

> case for UI testing).

>

> Is this possible?

>

> Thanks in advance.

Guest decksta
Posted

Re: Starting Terminal Services Sessions from the server

 

Thanks!

 

You understand my issue correctly. I will give this a try and post back

with my results.

 

Is a terminal services license server required for more than two user

accounts?

 

"Soo Kuan Teo [MSFT]" wrote:

> If I understand correctly, you want to be able to automate the creation of

> Terminal Services session with different user accouts.

> If you're using Win2k3 Terminal Services, you can try this to see if it

> works for you:

> In your programs/scripts:

> 1. Use TSWMI Win32_TSLogonSetting to set autologon to user1. Make sure

> PromptForPassword property is set to 0.

> 2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe /v:servername".

> A new User1 TS session will be created. If you have startup script, it

> should be running within the session

> 3. Use TSWMI Win32_TSLogonSetting to set autologon to User2. wait a few

> seconds

> 4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe /v:servername".

> A new User2 TS session will be created. it should be running within the

> session

> 5. repeat step1 and 2 with your user account as many time as you need.

>

> If you want to allow a single user account to have multiple session, you can

> set this property with Win32_TerminalServiceSetting.SetSingleSession Method

>

> Thanks

> Soo Kuan

>

> For more info on TSWMI, please visit:

> http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services-_2800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

>

>

>

> --

> This posting is provided "AS IS" with no warranties, and confers no rights.

>

> "decksta" <decksta@discussions.microsoft.com> wrote in message

> news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

> > Is it possible to start terminal services sessions from the local server

> > via

> > startup scripts?

> >

> > I would like to have say 8 users on a server and when that server boots, a

> > script starts a terminal services session for each user. Those user

> > sessions

> > would then have their own set of startup scripts to run applications (in

> > this

> > case for UI testing).

> >

> > Is this possible?

> >

> > Thanks in advance.

>

>

Guest Vera Noest [MVP]
Posted

Re: Starting Terminal Services Sessions from the server

 

Yes, you will need to install terminal Services + a TS Licensing

Server + install a purchased TS CAL on the LS, one for every user

or client.

_________________________________________________________

Vera Noest

MCSE, CCEA, Microsoft MVP - Terminal Server

TS troubleshooting: http://ts.veranoest.net

___ please respond in newsgroup, NOT by private email ___

 

=?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com> wrote

on 23 okt 2007 in microsoft.public.windows.terminal_services:

> Thanks!

>

> You understand my issue correctly. I will give this a try and

> post back with my results.

>

> Is a terminal services license server required for more than

> two user accounts?

>

> "Soo Kuan Teo [MSFT]" wrote:

>

>> If I understand correctly, you want to be able to automate the

>> creation of Terminal Services session with different user

>> accouts. If you're using Win2k3 Terminal Services, you can try

>> this to see if it works for you:

>> In your programs/scripts:

>> 1. Use TSWMI Win32_TSLogonSetting to set autologon to user1.

>> Make sure PromptForPassword property is set to 0.

>> 2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

>> /v:servername". A new User1 TS session will be created. If you

>> have startup script, it should be running within the session

>> 3. Use TSWMI Win32_TSLogonSetting to set autologon to User2.

>> wait a few seconds

>> 4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

>> /v:servername". A new User2 TS session will be created. it

>> should be running within the session

>> 5. repeat step1 and 2 with your user account as many time as

>> you need.

>>

>> If you want to allow a single user account to have multiple

>> session, you can set this property with

>> Win32_TerminalServiceSetting.SetSingleSession Method

>>

>> Thanks

>> Soo Kuan

>>

>> For more info on TSWMI, please visit:

>> http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services-_2

>> 800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

>>

>>

>>

>> --

>> This posting is provided "AS IS" with no warranties, and

>> confers no rights.

>>

>> "decksta" <decksta@discussions.microsoft.com> wrote in message

>> news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

>> > Is it possible to start terminal services sessions from the

>> > local server via

>> > startup scripts?

>> >

>> > I would like to have say 8 users on a server and when that

>> > server boots, a script starts a terminal services session for

>> > each user. Those user sessions

>> > would then have their own set of startup scripts to run

>> > applications (in this

>> > case for UI testing).

>> >

>> > Is this possible?

>> >

>> > Thanks in advance.

Guest decksta
Posted

Re: Starting Terminal Services Sessions from the server

 

So by default Windows Server 2003 only allows 2 TS clients?

 

And if I'm only going to automatically create sessions via script on the

terminal server itself do I still need a license per user (session) or a

single device license?

 

Thanks for your help.

 

 

"Vera Noest [MVP]" wrote:

> Yes, you will need to install terminal Services + a TS Licensing

> Server + install a purchased TS CAL on the LS, one for every user

> or client.

> _________________________________________________________

> Vera Noest

> MCSE, CCEA, Microsoft MVP - Terminal Server

> TS troubleshooting: http://ts.veranoest.net

> ___ please respond in newsgroup, NOT by private email ___

>

> =?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com> wrote

> on 23 okt 2007 in microsoft.public.windows.terminal_services:

>

> > Thanks!

> >

> > You understand my issue correctly. I will give this a try and

> > post back with my results.

> >

> > Is a terminal services license server required for more than

> > two user accounts?

> >

> > "Soo Kuan Teo [MSFT]" wrote:

> >

> >> If I understand correctly, you want to be able to automate the

> >> creation of Terminal Services session with different user

> >> accouts. If you're using Win2k3 Terminal Services, you can try

> >> this to see if it works for you:

> >> In your programs/scripts:

> >> 1. Use TSWMI Win32_TSLogonSetting to set autologon to user1.

> >> Make sure PromptForPassword property is set to 0.

> >> 2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

> >> /v:servername". A new User1 TS session will be created. If you

> >> have startup script, it should be running within the session

> >> 3. Use TSWMI Win32_TSLogonSetting to set autologon to User2.

> >> wait a few seconds

> >> 4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

> >> /v:servername". A new User2 TS session will be created. it

> >> should be running within the session

> >> 5. repeat step1 and 2 with your user account as many time as

> >> you need.

> >>

> >> If you want to allow a single user account to have multiple

> >> session, you can set this property with

> >> Win32_TerminalServiceSetting.SetSingleSession Method

> >>

> >> Thanks

> >> Soo Kuan

> >>

> >> For more info on TSWMI, please visit:

> >> http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services-_2

> >> 800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

> >>

> >>

> >>

> >> --

> >> This posting is provided "AS IS" with no warranties, and

> >> confers no rights.

> >>

> >> "decksta" <decksta@discussions.microsoft.com> wrote in message

> >> news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

> >> > Is it possible to start terminal services sessions from the

> >> > local server via

> >> > startup scripts?

> >> >

> >> > I would like to have say 8 users on a server and when that

> >> > server boots, a script starts a terminal services session for

> >> > each user. Those user sessions

> >> > would then have their own set of startup scripts to run

> >> > applications (in this

> >> > case for UI testing).

> >> >

> >> > Is this possible?

> >> >

> >> > Thanks in advance.

>

Guest Vera Noest [MVP]
Posted

Re: Starting Terminal Services Sessions from the server

 

Yes. Well, it actually allows 3 connections, 2 normal ones and a

console session, for an Administrator.

Even if you create those sessions automatically, someone is

ultimately going to connect to them, right? So you'll need proper

licensing.

_________________________________________________________

Vera Noest

MCSE, CCEA, Microsoft MVP - Terminal Server

TS troubleshooting: http://ts.veranoest.net

___ please respond in newsgroup, NOT by private email ___

 

=?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com> wrote

on 29 okt 2007 in microsoft.public.windows.terminal_services:

> So by default Windows Server 2003 only allows 2 TS clients?

>

> And if I'm only going to automatically create sessions via

> script on the terminal server itself do I still need a license

> per user (session) or a single device license?

>

> Thanks for your help.

>

>

> "Vera Noest [MVP]" wrote:

>

>> Yes, you will need to install terminal Services + a TS

>> Licensing Server + install a purchased TS CAL on the LS, one

>> for every user or client.

>> _________________________________________________________

>> Vera Noest

>> MCSE, CCEA, Microsoft MVP - Terminal Server

>> TS troubleshooting: http://ts.veranoest.net

>> ___ please respond in newsgroup, NOT by private email ___

>>

>> =?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com>

>> wrote on 23 okt 2007 in

>> microsoft.public.windows.terminal_services:

>>

>> > Thanks!

>> >

>> > You understand my issue correctly. I will give this a try

>> > and post back with my results.

>> >

>> > Is a terminal services license server required for more than

>> > two user accounts?

>> >

>> > "Soo Kuan Teo [MSFT]" wrote:

>> >

>> >> If I understand correctly, you want to be able to automate

>> >> the creation of Terminal Services session with different

>> >> user accouts. If you're using Win2k3 Terminal Services, you

>> >> can try this to see if it works for you:

>> >> In your programs/scripts:

>> >> 1. Use TSWMI Win32_TSLogonSetting to set autologon to user1.

>> >> Make sure PromptForPassword property is set to 0.

>> >> 2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

>> >> /v:servername". A new User1 TS session will be created. If

>> >> you have startup script, it should be running within the

>> >> session 3. Use TSWMI Win32_TSLogonSetting to set autologon

>> >> to User2. wait a few seconds

>> >> 4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

>> >> /v:servername". A new User2 TS session will be created. it

>> >> should be running within the session

>> >> 5. repeat step1 and 2 with your user account as many time as

>> >> you need.

>> >>

>> >> If you want to allow a single user account to have multiple

>> >> session, you can set this property with

>> >> Win32_TerminalServiceSetting.SetSingleSession Method

>> >>

>> >> Thanks

>> >> Soo Kuan

>> >>

>> >> For more info on TSWMI, please visit:

>> >> http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services

>> >> -_2 800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

>> >>

>> >>

>> >>

>> >> --

>> >> This posting is provided "AS IS" with no warranties, and

>> >> confers no rights.

>> >>

>> >> "decksta" <decksta@discussions.microsoft.com> wrote in

>> >> message

>> >> news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

>> >> > Is it possible to start terminal services sessions from

>> >> > the local server via

>> >> > startup scripts?

>> >> >

>> >> > I would like to have say 8 users on a server and when that

>> >> > server boots, a script starts a terminal services session

>> >> > for each user. Those user sessions

>> >> > would then have their own set of startup scripts to run

>> >> > applications (in this

>> >> > case for UI testing).

>> >> >

>> >> > Is this possible?

>> >> >

>> >> > Thanks in advance.

Guest decksta
Posted

Re: Starting Terminal Services Sessions from the server

 

Well "someone" will not be a human being. These sessions are used for

automated UI testing. There is a script that runs in the background in each

user session that constantly runs tests in a browser and reports the results

back to a test harness.

 

I can take care of the licensing issue, no problem.

 

I'm having trouble creating these TS sessions via script. Any thoughts?

 

 

"Vera Noest [MVP]" wrote:

> Yes. Well, it actually allows 3 connections, 2 normal ones and a

> console session, for an Administrator.

> Even if you create those sessions automatically, someone is

> ultimately going to connect to them, right? So you'll need proper

> licensing.

> _________________________________________________________

> Vera Noest

> MCSE, CCEA, Microsoft MVP - Terminal Server

> TS troubleshooting: http://ts.veranoest.net

> ___ please respond in newsgroup, NOT by private email ___

>

> =?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com> wrote

> on 29 okt 2007 in microsoft.public.windows.terminal_services:

>

> > So by default Windows Server 2003 only allows 2 TS clients?

> >

> > And if I'm only going to automatically create sessions via

> > script on the terminal server itself do I still need a license

> > per user (session) or a single device license?

> >

> > Thanks for your help.

> >

> >

> > "Vera Noest [MVP]" wrote:

> >

> >> Yes, you will need to install terminal Services + a TS

> >> Licensing Server + install a purchased TS CAL on the LS, one

> >> for every user or client.

> >> _________________________________________________________

> >> Vera Noest

> >> MCSE, CCEA, Microsoft MVP - Terminal Server

> >> TS troubleshooting: http://ts.veranoest.net

> >> ___ please respond in newsgroup, NOT by private email ___

> >>

> >> =?Utf-8?B?ZGVja3N0YQ==?= <decksta@discussions.microsoft.com>

> >> wrote on 23 okt 2007 in

> >> microsoft.public.windows.terminal_services:

> >>

> >> > Thanks!

> >> >

> >> > You understand my issue correctly. I will give this a try

> >> > and post back with my results.

> >> >

> >> > Is a terminal services license server required for more than

> >> > two user accounts?

> >> >

> >> > "Soo Kuan Teo [MSFT]" wrote:

> >> >

> >> >> If I understand correctly, you want to be able to automate

> >> >> the creation of Terminal Services session with different

> >> >> user accouts. If you're using Win2k3 Terminal Services, you

> >> >> can try this to see if it works for you:

> >> >> In your programs/scripts:

> >> >> 1. Use TSWMI Win32_TSLogonSetting to set autologon to user1.

> >> >> Make sure PromptForPassword property is set to 0.

> >> >> 2. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

> >> >> /v:servername". A new User1 TS session will be created. If

> >> >> you have startup script, it should be running within the

> >> >> session 3. Use TSWMI Win32_TSLogonSetting to set autologon

> >> >> to User2. wait a few seconds

> >> >> 4. Wait a few seconds, Execute/CreateProcess with "mstsc.exe

> >> >> /v:servername". A new User2 TS session will be created. it

> >> >> should be running within the session

> >> >> 5. repeat step1 and 2 with your user account as many time as

> >> >> you need.

> >> >>

> >> >> If you want to allow a single user account to have multiple

> >> >> session, you can set this property with

> >> >> Win32_TerminalServiceSetting.SetSingleSession Method

> >> >>

> >> >> Thanks

> >> >> Soo Kuan

> >> >>

> >> >> For more info on TSWMI, please visit:

> >> >> http://blogs.msdn.com/ts/archive/2006/10/03/Terminal-Services

> >> >> -_2 800_TS_2900_-Remote-Configuration-Primer-Part-1.aspx

> >> >>

> >> >>

> >> >>

> >> >> --

> >> >> This posting is provided "AS IS" with no warranties, and

> >> >> confers no rights.

> >> >>

> >> >> "decksta" <decksta@discussions.microsoft.com> wrote in

> >> >> message

> >> >> news:D09AAEBB-D8D3-4DCD-8ACA-609A7AB2F98E@microsoft.com...

> >> >> > Is it possible to start terminal services sessions from

> >> >> > the local server via

> >> >> > startup scripts?

> >> >> >

> >> >> > I would like to have say 8 users on a server and when that

> >> >> > server boots, a script starts a terminal services session

> >> >> > for each user. Those user sessions

> >> >> > would then have their own set of startup scripts to run

> >> >> > applications (in this

> >> >> > case for UI testing).

> >> >> >

> >> >> > Is this possible?

> >> >> >

> >> >> > Thanks in advance.

>

Guest decksta
Posted

Re: Starting Terminal Services Sessions from the server

 

Is there a better way than doing the following?

 

Call from a server startup script:

 

mstsc profile1.rdp /v:localhost

mstsc profile2.rdp /v:localhost

mstsc profile3.rdp /v:localhost

 

....and so on.

×
×
  • Create New...