Terminal Service test

If you have information, script, utility, or idea that can be useful for HostMonitor community, you welcome to share information in this forum.
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Terminal Service test

Post by KS-Soft »

1st version of TSCheck utility available at
http://www.ks-soft.net/download/tscheck.exe
This is command line utility that can be used with Shell Script test method
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell

There is 1 mandatory command line parameter:
- host:<hostname>
and 2 optional parameters:
-user:<user_name>
-password:password

Regards
Alex
violant
Posts: 51
Joined: Sat Apr 25, 2009 1:23 pm
Location: Ukraine

Post by violant »

Please post source code of commandline utility for add exeption and description of reply. What means reply 1.
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We do not provide source codes for our software.

Normally utility should return some meaningful description. What Windows do you use? Service Pack?
What exactly result do you see? "ScriptRes:Bad:1"? "ScriptRes:Unknown:1"?

Regards
Alex
violant
Posts: 51
Joined: Sat Apr 25, 2009 1:23 pm
Location: Ukraine

Post by violant »

I use W2k3 SP2. Connect to RDP server W2k8. Test work fine, until I have problem with licensing, but now i didn't have problem and can connect over rdp fine.
What reply mean?
It result from Scriptmanager. Usually Reply 0 Status Ok.
[12:35:25] Script executed, correct result received:
----------
- Status: Bad
- Reply: 1
----------
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I do not see any mistake in our code. TSCheck utility calls Windows function WTSOpenServer. When function returns 0, utility calls GetLastError to retireve error description.

It should not return 0 or 1..
May be you are using some additional script that wraps around TSCheck?
or may be you are using some "pre production" version of this utility? Do you use version 1.00?

Regards
Alex
PeterRanson
Posts: 1
Joined: Thu May 06, 2010 3:07 am

Post by PeterRanson »

Hi,

im having a problem with this tool. currently im running it from command line manually just to check its working ok. Im running Windows 2003 Server SP2 (64-bit).

I can connect successfully to my client via RDP from the server im using, but when i try to connect to it via the tool (tscheck -host:x.x.x.x) i get the following message: ScriptRes:Bad:The RPC server is unavailable

The server im checking is behind a firewall, so only the RDP ports are open on it.

Any ideas?

EDIT: ive done some further testing. I have tried on another 64-bit machine, no problem so that is ruled out.

i have tried to a machine that has no firewall infront of it .. no problem either. so this must be a firewall isuue, although odd seeing as i can connect to it on the RDP port.

does this tool use other ports?
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

It uses Windows API so it should use standard TCP ports. By default RDP uses port 3389. Do you use this port?

Regards
Alex
sergei_og
Posts: 8
Joined: Wed Jun 18, 2008 7:41 am

maybe bug ?

Post by sergei_og »

i am connect remote to the server with mstsc.exe
when i try tscheck.exe -host:localhost on win2003 terminal server util say
ScriptRes:Bad:The RPC server is unavailable.
when i try tscheck.exe -host:127.0.0.1 on win2003 terminal server util say
ScriptRes:Bad:Access is denied.
with user name and password or not.

in file C:\WINDOWS\system32\drivers\etc\hosts
......
127.0.0.1 localhost
......

Can you help please ?
:)
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We cannot reproduce the problem.
What account do you use for connection? Is it member of Remote Desktop Users group?

Regards
Alex
zarobhr
Posts: 19
Joined: Wed Sep 17, 2008 11:12 am

Terminal Service test

Post by zarobhr »

i have tried to run this as a shell script and truthfully i dont quite understand how shell script work can you post example of shell script for running tstest using hostname userid and password
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Command line:
tscheck.exe - host:10.10.5.10 -user:admin -password:kjdfhgk1234

Regards
Alex
zarobhr
Posts: 19
Joined: Wed Sep 17, 2008 11:12 am

Post by zarobhr »

KS-Soft wrote:Command line:
tscheck.exe - host:10.10.5.10 -user:admin -password:kjdfhgk1234

Regards
Alex
this is what i put in the script

startcmd

cmd /c %Script% %Params%

script

"c:\tstest\tscheck.exe" -host:%1 -user:%2 -password:%3

but no matter would the result on the hostmonitor test comes back ok even if i type the password wrong, how do i do the scrpt so it tells me there is a problem
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If you use tscheck.exe - host:10.10.5.10 -user:admin -password:kjdfhgk1234 as command line and keep script body empty, you will save some system resources.
but no matter would the result on the hostmonitor test comes back ok even if i type the password wrong, how do i do the scrpt so it tells me there is a problem
Well, if there is problem with terminal service, it should change test status.
If you are using wrong password, it will connect using current user credentials.

Regards
Alex
zarobhr
Posts: 19
Joined: Wed Sep 17, 2008 11:12 am

Post by zarobhr »

KS-Soft wrote:If you use tscheck.exe - host:10.10.5.10 -user:admin -password:kjdfhgk1234 as command line and keep script body empty, you will save some system resources.
but no matter would the result on the hostmonitor test comes back ok even if i type the password wrong, how do i do the scrpt so it tells me there is a problem
Well, if there is problem with terminal service, it should change test status.
If you are using wrong password, it will connect using current user credentials.

Regards
Alex
lets word this a different way maybe you will under stand

i set upo the test
here is the command
cmd /c "c:\tstest\tscheck.exe -host:199.xx.xxx.xxx -user:crgt-acct\administrator -password:xxxxxx123"

if i do a lets try i get
[3:39:32 PM] Script executed, correct result received:
----------
- Status: Ok
- Reply:
----------
if i type a wrong password or change ip address to a bad server and then do a lets try i get this

[3:40:13 PM] HostMonitor is going to execute "TSTEST" script ...
[3:40:33 PM] Error: script timed out

when i have the test setup and firing the status is always ok who can i get it to not be okay if the server password is wrong or if server is unreachable , i just to it to show as a problem so i can send an alert
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

[3:40:13 PM] HostMonitor is going to execute "TSTEST" script ...
[3:40:33 PM] Error: script timed out
You may increase timeout.
when i have the test setup and firing the status is always ok who can i get it to not be okay if the server password is wrong or if server is unreachable , i just to it to show as a problem so i can send an alert
if server is unreachable? No problem. Just increase timeout specified for the test.
if the password is wrong? This utility is not designed for this.

Regards
Alex
Post Reply