Bob Lin, Chicagotech-MVP, MCSE & CNE
Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on
http://www.ChicagoTech.net
How to Install and Configure Windows, VMware, Virtualization and Cisco on
http://www.HowToNetworking.com
Situation: Just installed Remote desktop services on one of Windows 2012 R2 server. When attempting to add some programs in RemoteApp programs, we get this message: the remoteserver is not available on the network.
Troubleshooting:
It is Environment Variables. Search online, we find some people have the similar case. Changing the path from %systemroot% to c:\windows and that fixed the problem.
In our case, chaging from PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;
to
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;
Situation: We have a Windows 2012 R2 server as Remote Desktop Server. Once for a while, no one except administrator (blin in this case) can login. The Task Manager Status shows all users are Disconnected. the User doesn’t show the username.
If I run qwinsta.exe, it shows all users except administrator (blin in our case) are disconnected or down.
I can’t force these disconnected users sign off or end process in Task Manager. We do have Timeout policy setup.
The only way to fix is restart the server. What could be the problem?
Troubleshooting: After reviewing the RDS configuration, we find this RD server was configured as Standard Session with all RD roles. However, all other RD server have been removed from the system and this is a standalone RD Server. Unchecked “Do not use an RD Gateway server” may or may not fix the problem.
We fix the problem by removing the RD Gateway from the RD Services, which converts Standard Session t o Quick Session.
These are other fixes we have tried but they don’t fix the problem.
1. I use the following logon option: mstsc /v:servername /console /admin in order to access the server. Then in “Windows Taks Manager”, go to the Users tab and proceed to do a right click over the account that you want to “Log Off”, select log off. This should free the locked session used by that account.
2. You can start a cmd, do a query session, check the id of the session to be killed and then do a reset session. For instance, if with query session you get that the session name rdp-tcp#1 is the one you want to kill, then you can execute reset session rdp-tcp#1 and get it killed.
3. Here’s how I resolved it:
1.I’ve located the session ID with qwinsta.
2.I’ve located the PID of winlogon.exe for the hung session with query process /ID:yourid.
3.I’ve killed the process with taskkill /f /PID yourPID.
4. 1)Locate the session ID with qwinsta. 2)Kill all processes under the session taskkill /FI “SESSION eq 1” /F, assuming the session ID you wanted to end returned from qwinsta was 1.
5. You can download the “Process Explorer” tool from Microsoft and use that to solve your problem. If you have the session IDs, you can find their respective processes. Then if a user session is disconnected, you can kill the process with Process Explorer.
6. My fix: On a different network sever i connected to the problem server via Computer Management tool, in open sessions I right clicked and closed every open file then was able to connect via mstsc
7. I want to share how I reset of the account without the
need to reboot the server. First of all you need to have administrator access
to the server.
I use the following logon option: mstsc /v:servername/console /admin in order
to access the server.
Then in “Windows Taks Manager”, go to the Users tab and proceed to do a right click over the
account that you want to “Log Off”, select log off.
This should free the locked session used by that account.
8. Use these commands
Use qwinsta to
get a list of the Remote Sessions in the command window (Get the session Id of
user to kick out):
Also you may want to change the default timeout for idle RDP connections
9. running under the locked account from under Task Manager and then I was able to simply log off that account (from an Administrator account).
10. I tried to end those 4 tasks assigned to this user. Be careful, because some tasks, most importantly csrss.exe, when killed, also would result in a reboot of the system. I skipped them and just killed some obvious RDP-tasks.
11. Here’s how I resolved it:
I’ve located the session ID with qwinsta.
I’ve located the PID of winlogon.exe for the hung session with query process /ID:yourid.
I’ve killed the process with taskkill /f /PID yourPID.
12. What worked for me was :
log on the server
open task manager
look for the user in the user tab
right-click, connect, enter the user password, I saw a ‘Please wait’ screen
press alt-tab, that logged me off from the server and logged off the user too.
13. Locate the session ID with qwinsta.
Kill all processes under the session taskkill /FI "SESSION eq 1" /F, assuming the session ID you wanted to end returned from qwinsta was 1.
This worked on Server 2012 Version 6.2 Build 9200, I would expect it to work on all version of windows.
Situation: When attempting to add licensing server in Windows 2012 R2 RS service, you may get this message: Unable to connect to the server by using Windows Powershell Remoting.
Troubleshooting:
We fix the problem. It is Environment Variables. Search online, we find some people have the similar case. Changing the path from %systemroot% to c:\windows and that fixed the problem.
In our case, chaging from PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;
to
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;
Note: without PATH= fixes the problem.
Other troubleshooting:
1. Disable IPv6 for a test.
2. Run Powershell, run this command: Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000
Then restart the server.
In a PS Shell
3. It could be the firewall issue. disable the Windows firewall or add ‘Windows Remote Management’ rule to my firewall.
4. clearing the proxy by running this command: netsh winhttp reset proxy
5. Compatibility problem when installing Remote desktop services role on 2012 “Unable to connect to the server by using Windows Powershell Remoting”
6. “Enable-PSRemoting -force” worked for me.
7. Solved the issue – DC and RDS server had 3 hour time difference. Syncing time worked.
8. If you want to add TS licensing service, add Server role. If you want to add this server under RDS licensing server to receive the RD CALs, go to Deployment.
9. had same issue fixed it by clearing the proxy
netsh winhttp reset proxy
worked for me
10. Domain admin can’t seem to do anything so added another admin account (with local admin rights) then running the RDS Deployment from an elevated Server Manager session did the trick for me.
11. The solution was to increase the MaxFieldLength and MaxRequestBytes keys in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
If the keys does not exists you can create them, be sure to use the DWORD type.
I sat MaxFieldLength to DEC value 40000 and MaxRequestBytes to DEC value 32768 and rebooted the server. Problem solved.
12. Solved the issue – DC and RDS server had 3 hour time difference. Syncing time worked.
13. My systems engineer found that my issue was caused by a System variable that was set incorrectly. The Path variable had been cleared, which was keeping Powershell Remoting from working correctly. He copied the variables from another server, and it is nowworking correctly.
14. If there is a GPO setting on the network that affects the server you are trying to install RDS on and that GPO controls WinRM listening ports and is incorrectly configured then you will get this error.
Run winrm enumerate winrm/config/listener on the target server and if ListeningOn = null is returned then check GPO on this box with gpresult /h result.html & result.html. Search this GPO output for Windows Components/Windows RemoteManagement (WinRM)/WinRM Service and IPv4 Filter and IPv6 Filter need to contain * or an IP range that includes this server. If the value is blank or wrong IP range then you will get the original posters error message!
15. In Server Manager/Remote Management was already enabled. My fix was to disable and then re-enable Remote Management. I was then able to reinstall RDS.
16. use “net time /domain:*** /set” and problem fixed.
Situation: The client has Symantec Endpoint Protection running on Windows 2008 R2. It is failed to download the definition files.
Troubleshooting: 1. research online and it could be firewall issue.
2. The company LAN servers and workstations don’t have issue. Only the DMZ servers have this problem.
3. The client just migrated their Cisco ASA firewall to Paloalto firewall.
4. Review the Paloalto firewall settings, we find it misses s DMZ policy to allow accessing Symantec download website. Creating a firewall policy fixes the problem.
Situation: The client can’t install Windows update with this Error 80072EFE on their DMZ web server.
Troubleshooting: 1. research online and it could be firewall issue.
2. The company LAN servers and workstations don’t have issue. Only the DMZ servers have this problem.
3. The client just migrated their Cisco ASA firewall to Paloalto firewall.
4. Review the Paloalto firewall settings, we find it misses s DMZ policy to allow accessing Microsoft download website. Creating a firewall policy fixes the problem.
5. Download and install Windows Update Assistant from Microsoft. This step by step video may help:
Situation: The client has a problem to download Windows update, even they try to download it manually.
Troubleshooting: we find they just replace their Cisco ASA firewall with Palo Alto firewall. There are the troubleshooting steps.
1. We resolved the URL From where updates were being downloaded to 134.170.51.186. 2. Checked on Firewall and saw that traffic was allowed to this URL and few sessions were identified as incomplete and few as web-browsing. 3. Created a security policy with no Security Profiles and we were able to download Microsoft Updates. 4. Checked Data Filtering Logs an saw that PE File type is blocked.
5. Removed PE from blocked file types and we were able to download Microsoft Updates.
Situation: When installing Windows updates, you have a problem to install KB 890830 and it blocks other update download,
Troubleshooting: 1. Hind KB 890830 from the Windows update or uninstall it.
2. Just delete the mrt file in Windows\system32\mrt. The launch Windows Update and hide the April 2016 MRT update. Afterward, restart Windows Update search 3 times again.
3. Try to download the Windows updates manually.
4. If you can’t downlaod the Windows Updates manually, check the firewall. This post may help:
Situation: Can’t download or install Windows Defender update.
Resolution: Resolution: Manually update Windows Defender to fix update failures KB2267602 (Definition 1.213.6196.0) – Error 0x80070643 by using this command “%programfiles%\windows defender\mpcmdrun.exe” -signatureupdate -http
Situation: When installing Windows update, you may receive this error: 0x80070643
Resolution: 1. Manually update Windows Defender to fix update failures KB2267602 (Definition 1.213.6196.0) – Error 0x80070643 by using this command “%programfiles%\windows defender\mpcmdrun.exe” -signatureupdate -http 2. Download and install Windows Update Assistant from Microsoft. This step by step video may help: