How to get RDP access again with multiple sessions on a machine
How to get RDP access again with multiple sessions on a machine
You may run into this scenario from time to time:
I am unable to RDP or TS into a server remotely because 2 people are logged in and the console port is in use.
Let’s just say that the people or person occuping the maximum number of allowed connections(including console) is new and doesn’t realize that they need to actually disconnect the session and not just click the ‘x’. So you are an admin too but you can’t RDP in. Here is an alternative method:
- Locate a machine that is running the same OS. In this case it was WIN2K8. You can obtain a remote prompt on that machine by using psexec.exe from:
http://www.hpdit.com/sysinternals/psexec.exe
Then you will want to query the terminal server of the machine you are not able to RDP into. (Discussed later)
- Copy the binary by clicking into it and saving locally to a place where you can find and execute it easily from the command line.
- Press Windows key and R and then type in cmd and press enter.
- CD to the directory you saved the psexec.exe binary and run the following command:psexec -u domain\admin_creds \\servername cmd
*Note you can always verify you have a remote command line prompt by checking the hostname as follows:
hostname
Press enter and it will produce the system’s hostname
- Press enter and type in the password of the user with the admin creds and press enter.
- Then do a query of terminal sessions by doing the following:query session /server:servername
- Look for the sessions to pop up and find the desireable one to end.
- End it by typing in the following:reset session [ID] /server:servername
- You can re-run that query again to determine that the session has been disconnected.
- Exit out of that prompt by typing exit and then pressing enter.
- Launch an RDP session ie.
mstsc /v:servername
A connection.
Multiple Desktops in Windows
( Linux / *nix ) feel in Windows
Making Windows feel like an open source environment
There’s a cool app that helps you multi-task in an organized and efficient way in windows. If you have used Freebsd, Suse, Slackware, DSL, Fedora, RHEL, etc. They all have a few things different that Windows does not have, that is that they allow you to have multiple desktops. Now that is a good idea that allows efficient work to be done in each desktop. It helps to be able to track what you are triaging or working on. Here is a program that gives windows that functionality as well:
https://www.hpdit.com/sysinternals/Desktops.exe
Pretty cool…
Remote command line prompt in Windows
For those of you that love working with the command line here is a type for working on a machine remotely without having RDP, VNC access to that Windows machine, or you might like to do things the remote shell way, ie. SSH, Stelnet, etc. If the answer is “Yes” here is a way for you to do it in Windows OS environment:
- Go to:http://www.hpdit.com/sysinternals/psexec.exe
- Click the psexec.exe binary
- Save to a location you can execute from the command line, like %systemdrive%\system32\ or C$\system32\
- Press Windows Key plus R and type in cmd and press enter
- CD to the directory that contains psexec.exe or you can execute it from the absolute path, or if you have it in your in environment path just simply execute from the command line prompt
- If you wish to obtain another machine’s command prompt without having to TS into that machine type the following: psexec.exe \\computername “cmd”
- There you have it remote command line access.
- When you are done type exit to get back to a local prompt.
Registry hack to allow easy command line anywhere access
Command Prompt anywhere Registry Hack
- Click start
- Click run
- type in notepad
- press enter
- paste the following code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\Command Prompt Here]
[HKEY_CLASSES_ROOT\Folder\shell\Command Prompt Here\command]
@=”;cmd.exe /k \”;cd %1\”;”;
Into the notepad
- Then from there click save as. Make sure you selected all files instead of .txt
- Name the file whatever you want but add the extension .reg
- Save it to a location you can execute the file to add the reg mod
- From there execute the file, then press Windows Key plus the letter E
- You then will be able to click into a drive like the C: drive and then right click a folder the option to Command Prompt Here will be available
- Left click that option and you will see a prompt come up in that location.
Performance tuning the Windows System Drive
From time to time the old issue of alert or log spamming will come up. With it the usual performance degradation and CPU throttling issues as well. During these times, it is best to find the large temp or log files and remove them from your Windows System Drive, for return to performance stability (RTPS). This can be done through Windows Search.
Press Windows Key then press S
If you have downloaded Windows Search you will need to on the left side select Search Companion.
Click all files and folders
From there then:
Click What size is it? Double arrows to expand
Then you can put in the size of the files. You can search for different file types as well such as (*.tmp, *.tpm, *.chk, *.log)
Select all (ctrl+a) then shift+del.
Also you can modify system paging to use one file rather than many when creating the paging file. This will help improve drive performance as well as minimize on orphaned files. That can be done in System Properties – Advanced – Under performance click settings – than advanced tab – click change – set the minimum and maximum to 1.5 times the physical memory – click set – reboot for changes.
This should help you remove unnecessary files while optimizing system performance.
Great Tool for Windows Server Active Directory Exploration
Another great tool worth reviewing is adexplorer.exe which allows in most AD environments users the ability to go and look at ADS. So this can be useful for determining if users belong to the correct OU. It runs stand alone and does not require necessarily that you are an Enterprise\Domain Admin. Also you can save some time while drilling down throw to the root cause of an issue whether it be ACLs, Perms, etc. related.
https://www.hpdit.com/sysinternals/ADExplorer.exe
At HPD Global – VIT Cloud Services we certainly have had the benefit of using this tool for Fortune 100 companies, we can attest to having this knowledge and experience to get the job done for any type of business environment. Without getting full active directory access to do a PCI Audit we were able to use this tool which allowed object attributes to be ignored in Active Directory and allow us to do User Object account audits. This was in regards to all the Administrator accounts which is something looked at when performing PCI, SOX, and IAB, MRC Audits. Is compliance a mystery to you and your Org? We can certainly help you get on track with regards to compliance, which is something not going away. Contact us today.
Windows Server 2003-2008 How to tell if a Server is a VM
Many advanced tricks for determining what you have in a client’s server environment can be determine easily and quickly, as long as you have Admin access to that machine. It is easy to know how many physicals hosts you have.
In order for this trick to work you will need to have Admin rights to the machine. Assuming that this is the case you can then proceed first of all you will want to psexec to the machine then from there simply run a reg query. The following line of code is what you will want to put in:
C:\reg query HKLM\SYSTEM\CurrentControlSet\Control\SystemInformation\
The results will be likely similar to the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SystemInformation
BIOSVersion REG_SZ 080112
BIOSReleaseDate REG_SZ 06/09/2009
SystemManufacturer REG_SZ Microsoft Corporation
SystemProductName REG_SZ Virtual Machine
InformationSource REG_DWORD 0×0
Forget writing down your passwords, Encrypt them with Keepass
Forget writing down your passwords on a piece of paper under your wallet. You can just store them in a free as in Open Source software program vault called Keepass. This is definitely a solution I will continue to consult on, but wanted to share how cool it was. You can neatly store your passwords in a categorical manner so it is easy to retrieve. You double click your password and it copies it to clipboard without showing the password to should browsers.
Keepass shortlyKeePass (or KeePass Password Safe) is a free/open-source password manager. KeePass helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish). |
So take a look if you need some immediate security and organization of your passwords. We offer encrypted cloud password storage. We can help you set it up, contact us.










