terminal-server interview questions
Top terminal-server frequently asked interview questions
Our Terminal Server (TS) is only accessible on one network, therefore I believe the default gateway has not been set correctly or needs to be updated.
I am looking for the commands in a telnet session to:
1. Review the current configuration of the terminal servers default gateway ip address and,
2. The command to set it if it needs to be changed.
The TS is a :
N-Base Xyplex Max Server 1640
I Have reviewed some on line documentation but can't really find a clear solution but I am also not a network tech!
Many Thanks
Source: (StackOverflow)
I am programming a software which can allow me to add users and modify them in ACTIVE DIRECTORY on Windows Server 2008 R2
I used
using System.DirectoryServices.AccountManagement;
[DirectoryRdnPrefix("CN")]
[DirectoryObjectClass("Person")]
public class UserPrincipalEx : UserPrincipal
{
// Implement the constructor using the base class constructor.
public UserPrincipalEx(PrincipalContext context)
: base(context)
{ }
// Implement the constructor with initialization parameters.
public UserPrincipalEx(PrincipalContext context,
string samAccountName,
string password,
bool enabled)
: base(context, samAccountName, password, enabled)
{ }
// Create the "TermSrvProfilePath" property.
[DirectoryProperty("msTSProfilePath")]
public string TermSrvProfilePath
{
get
{
if (ExtensionGet("msTSProfilePath").Length != 1)
return "vide";
return (string)ExtensionGet("msTSProfilePath")[0];
}
set { ExtensionSet("msTSProfilePath", value); }
}
public static new UserPrincipalEx FindByIdentity(PrincipalContext context,
string identityValue)
{
return (UserPrincipalEx)FindByIdentityWithType(context,
typeof(UserPrincipalEx),
identityValue);
}
[DirectoryProperty("wWWHomePage")]
public string wWWHomePage
{
get
{
if (ExtensionGet("wWWHomePage").Length != 1)
return null;
return (string)ExtensionGet("wWWHomePage")[0];
}
set { this.ExtensionSet("wWWHomePage", value); }
}
}
So, and what is the result ?
I successfully read the wWWHomePage attribute but it is empty when i try to get : TermSrvProfilePath ....
I don't understand, i am fully lost !
Source: (StackOverflow)
I am getting following error when trying to run an application on a Windows Server 2008 on Terminal Server:
Retrieving the COM class factory for component with CLSID {abcdef} failed due to the following error: 80040154
I connect via remote to the Terminal Server and to the Terminal Server one requiered .dll is "passed".
I tried several things, like compiling one version of the application in x86, trying to register the interop dll etc. but nothing works.
In the end I tried one Version which works on a customers Server but the same problem.
At client site, there are entries in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{3E7F07BE-37A9-4F37-894E-6316543BBE71}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\xxCOM.xx\CLSID
xx is the name of the applicaction
at server side there is no entry.
Maybe it is just an wrong or missing configuration on terminal server?
Both, client and server are running on virtual machines.
Any suggestions?
Thank you!
Some links i followed:
same error
DCOMCNFG
Source: (StackOverflow)
I have some very strange problems. I have an application running on Windows 2003 terminal server from multiple clients. The application uses SQL Server 2008 Express as its database.
Yesterday, I connected to the app, closed some sessions on the server that were not responding, and to my surprise, I saw that some data was missing from the database. After a futher search I found that all the database changes made from last week were lost.
It's like the database rolled back all the changes, and returned to the state of one week ago! I can confirm that all the changes were lost. In fact I have inserted a record into a table with identity_insert ON
(to manually insert an ID on an autonumeric col) and that record is missing, so there is no way this is a program failure.
Does anyone have any idea of what could have happend here?
EDIT
I have a suspect: could a transaction initiated by a session stays in a unconfirmed state for one week, retain all the database changes and when I close the session rollback all the changes made?
EDIT II
Find this on log:
Source: (StackOverflow)
Are there any logging/trace tools that I can enable for a Delphi-based EXE without having access to the Delphi code, just the compiled EXE and related DLLs?
Here is why I need it: some users of our Windows 2012 Remote Desktop Server (previously called Terminal Server) encounter C0000006 External Exception errors periodically, but only for our third-party Delphi-based applications that are accessed from a shared location on the network (i.e. not local to the RDS server). Local PC users in the office accessing the same files the same way do not have the problem. RDS users do not experience the problem if the EXEs are copied to the RDS server; that, however, is just a test, and not the solution, due to some constraints of the application.
Here is the kicker: it happens only with RDS clients running on the Mac (about six users), not Windows RDS clients (about 15 users).
I already posted a detailed but as-yet unanswered question on the MS terminal server forum. My research indicates that this behaviour is nothing new.
- Windows 2000 had a fix for a problem with the same symptom that was related to Windows being confused regarding which client session had a particular program open.
- Even as recently as Windows 2008, there are Delphi-specific network access issues on RDS related to the way it loads portions of EXEs/DLLs on demand, rather than one time when opening the application. I infer that, while the symptoms are the same, the underlying cause must be somewhat different.
So, while I await the prognosis of the third-party developers, I am trying to find out if there is any way I can set up a trace of activity, either Delphi-specific or perhaps even network-related, that can tell me the moments when a particular session accesses a particular network file. This, at least, could possibly help me identify events that correlate with the moments the users experience the errors.
Source: (StackOverflow)
I would like to use kermit
through terminal server from a Python
code. I tried to solve it with pexpect
module but after the spawn it logs out with EOF so the child is dead.
child = pexpect.spawn('echo os.environ["MODULESHOME"]/init/sh; module add kermit; kermit kermit-vpp.kermit -- ' + target + ' ' + port)
child.maxread=1000
i = child.expect_exact(['-----------', 'U-Boot', pexpect.EOF, pexpect.TIMEOUT], timeout=20)
print child.before
if i == 1:
print '****Timeout'
sys.exit(1)
if i == 2:
print '****Eof'
sys.exit(1)
Is there any idea to solve it?
Source: (StackOverflow)
I am running a script that telnets to a terminal server
. Occasionally the script is launched while one instance is already running, which causes the already running script to fail with
EOFError: telnet connection closed
Is there a quick and easy and pythonic
way to check if the required socket is already in use on the client computer before I try to open a connection with telnetlib
?
SOLUTION:
I wanted to avoid making a subprocess call but since I do not control software on the client computers, and other programs may be using the same socket, the file lock suggestion below (a good idea) wouldn't work for me. I ended up using SSutrave's suggestion. Here is my working code that uses netstat in Windows 7:
# make sure the socket is not already in use
try:
netstat = subprocess.Popen(['netstat','-nao'],stdout=subprocess.PIPE)
except:
raise ValueError("couldn't launch netstat to check sockets. exiting")
ports = netstat.communicate()[0]
if (ip + ':' + port) in ports:
print 'socket ' + ip + ':' + port + ' in use on this computer already. exiting'
return
Source: (StackOverflow)
Pardon my very broad question here guys. I don't ever really do much coding (at all) and was hoping you guys could help me out. Basically what I would like to do is have an end user run a script that asks them what Session ID they would like to disconnect. This will be used in conjunction with the "tsdiscon" command.
So the script would open > Ask for session ID > disconnect that session ID.
Seems pretty simple but like I said, I never do any of this. Thank you guys for any help!
Source: (StackOverflow)
I have a few Jenkins builds that have tests that require an existing session (Windows GUI) so they cannot run as a service.
Because these tests (using nunit) do not need to install things on the machine they could easily run in separate terminal server sessions.
How is it possible to enable this, so it would start the tests (a batch script that is supposed to return zero on success) as a different user in a different session?
Source: (StackOverflow)
Here's the setup: A Cisco 2800 series (2811 to be exact) is connected to a dozen or so serial devices. It acts as our terminal server. The normal usage is to use this terminal server to telnet to the respective serial devices (ie. "telnet terminal.server.ip 2070" would open a shell to the device on "line 70").
What I'm trying to do is slightly different: I have a PC connected to the "Console" port on the back of the terminal server. Note that this is a serial connection, not a telnet session or the like. I can connect to the terminal server just fine and get to the normal IOS shell. What I am stuck on is then opening a console to any of the serial devices from within that IOS shell. I would like to type something like "connect line 70" or "telnet serial 1/31".
It appears that all of "connect" or "telnet" or "ssh" commands take in a hostname or IP as a parameter, but not a serial port name. I tried connecting/telnetting to "localhost" and "127.0.0.1" with no luck. I tried the IP's of some loopback devices with no luck. In the loopback case, it actually said "connection refused", in other cases, it simply timed out.
Any tips?
PS. as a followup, getting into the router/terminal server then using "show hosts" helps a lot. if a host name shows up as, say "hostX", then simply typing "hostX" will make a connection to that host. i believe this telnets the local loopback address and uses the appropriate port to route it to the serial port. perhaps this is as "direct" as we can get. My fear is that I might be able to get to the console server, but not be able to set the loopback address (pretend it's missing or erroneous), and therefore not be able to telnet to the serial port. Likewise, what if a serial port wasn't given a host name? how can I connect to that if I don't have the Config password?
Source: (StackOverflow)
I want to schedule a task on Windows Terminal Server 2008 and above which runs every 10 Minutes and terminates some processes like "outlook.exe", however this only should be done for users which connect from another TerminalServer (so they all have the same Client Name - the user shell use Outlook on their own machines - Outlook has to be installed because of users who connect from homeoffice).
The taskmanager shows username, processes and client name.
this little code works fine to list all logged on users
strComputer = "." Set objWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" _
& strComputer & "\root\cimv2")
Set colSessions = objWMI.ExecQuery _
("Select * from Win32_LogonSession Where LogonType = 10")
If colSessions.Count = 0 Then Echo "No interactive users found"
Else echo "RDP Sessions:" For Each objSession in colSessions
Set colList = objWMI.ExecQuery("Associators of " _
& "{Win32_LogonSession.LogonId=" & objSession.LogonId & "} " _
& "Where AssocClass=Win32_LoggedOnUser Role=Dependent" )
For Each objItem in colList
Echo "Username: " & objItem.Name & " FullName: " & objItem.FullName
Next Next End If
A user could get his own Client Name shown like here
Set objShell = CreateObject( "WScript.Shell" ) ClientComp =
objShell.ExpandEnvironmentStrings("%clientname%")
But I do not want every user to have an own vbs open permanently. A task should be scheduled with administrator previleges. There seems to be no way to realize this using vbs and WMI, has someone of you a hint please?
Source: (StackOverflow)
We have Windows Server 2003 Enterprise Edition installed in our server PC. We have deployed our own windows application on Server. Now we need that all the client pc's access it via RDP. But problem is when one user opens it, session of another user automatically gets closed.
I find links saying to use Terminal Server Mode. But I cannot find how to configure all the clients as Termnial users. Is terminal server mode the solution ? If yes, any tutorial to set it up ?
Thank you very much.
Source: (StackOverflow)