How to properly end a Remote Desktop session?

I use Remote Desktop to access multiple PCs at work that run scheduled tasks on Task Scheduler.  For these tasks to run correctly I need to be logged into the machine.  We have Group Policy, that I cannot get changed, that limits a disconnected
remote session to 2 days.  It appears to me, that because of this, my PCs are logging out on Sundays due to the fact that I last remoted into them on Friday.  I am able to remote back into the PCs on Sunday evening and allow my processes to run correctly
on Monday morning, but I would like to not have to do this every week.  Is there a way to end the remote session, stay logged into the PC, and not be in the disconnected state that is causing the log off with the group policy?  I do not experience
any problems with PCs that I log into locally and then lock.  Can I put my PCs in this same locked state, as if I were locking and ending a local session, when I end a remote session?

When you go into a remote desktop session. Simply click the "X" on the upper menu bar and it will keep you logged into the client computer but close it out of your screen. However, if someone logs into the client computer locally it wil disconnect your
session and there is no way around that.
Don't forget to mark the post that solved your issue as "Answered." By marking the Answer you are enabling users with similar issues to find what helped you. Lewis Renwick - IT Professional

Similar Messages

  • How can I Deny permissions to logon to Remote Desktop Session Host server in powershell script?

    I am need of some assistance please. I am a system admin and I am trying to create a script that will assist with the tedious tasks I have to do with disabling a user that no longer works for the company.
    I have created a script so far that will reset the users passwords and remove them from all groups (minus domain users).
    I am trying to make it where it will deny permissions to logon to Remote Desktop Session Host server as well as give full mailbox permission to the manager in Exchange Server 2010.
    I know with Exchange 2010, I will need to add the Powershell snapin. Is there a way for this to be added into the script? I am thinking to add the code:
    add-pssnapin Microsoft.exchange.management.powershell.e2010
    Is there another way to do this? Any help or recommendations would be much appreciated.
    $ou = Get-ADUser -SearchBase "<*OU info here*>" -Filter * |
    Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "<*Password here*>" -Force)
    foreach ($user in $ou) {
    $UserDN = $user.DistinguishedName
    Get-ADGroup -LDAPFilter "(member=$UserDN)" | foreach-object {
    if ($_.name -ne "Domain Users") {remove-adgroupmember -identity $_.name -member $UserDN -Confirm:$False} }

    Why not just disable the account?Why are you searching an OU foro users when you just want to terminate one user?
    You can remotely connect an exchange session and manipulate the mailbox permissions.  You do not load a snap-in except on the Exchange server.
    $Session=New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange 2013 Client Access server>/PowerShell/
    Import-PSSession $Session
    # exchange commands here
    \_(ツ)_/
    We have a checklist we have to go through with the tasks listed. We have to keep to the account enabled until HR changes
    the status which is usually 30-90 days depending. Managers sometimes need to access the accounts to retrieve information, etc. We put the users in an OU; once we are given permission from the manager we move forward in the removal. 

  • How to enable 2 concurrent Administrative remote desktop sessions in Win 2008 R2 ??

    Hi,
    By default, 2008 R2 allow 2 concurrent administrative remote desktop sessions. But when i trying to connect 2nd administrative remote session, the 1 st will be disconnected.
    Is any settings need or just my misunderstanding ??
    Thanks

    Hi,
    Thanks for your posting in Windows Server Forum.
    Yeah, agree with words of Bred; only 2 remote desktop session is allowed for administrative purpose. If you want more than 2 remote desktop session than you need to purchase RDS CAL, install RD Licensing role activate it first and then configure CAL on it.
    There are 2 types of CAL available (USER & DEVICE). You can purchase CAL according to your company requirements. For more information you can refer below article.
    Install and issue RDS CALs or TS CALs
    http://technet.microsoft.com/en-us/library/hh553159(v=ws.10).aspx
    Hope it helps!
    Thanks,
    Dharmesh

  • Your Remote Desktop session has ended

    Hi,
    I have installed an RDS 2012r2 server and am using session hosting to publish a remote app or desktop to run this app.
    In both cases I can run one instance but when a second client connects I receive the message in the title.
    I'm thinking this is a configuration item I've overlooked?
    Thanks for any help
    Rich

    Hi,
    Thank you for posting in Windows Server Forum.
    Please notice that every server will provide 2 remote session for administration purpose only. Whenever we try to login with more than 2 remote user then by default it will ask the other user to log off and connect new user. If you want more than 2 remote session
    then we need to install RD License server and purchase RDS CAL (User or device) and configure it.
    If the above one is not the case then kindly see whether you have not enabled any policy setting as to limit number of connections for server. You can check below GPO for this setting.
    Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections
    Limit number of connections: Enable
    In the RD Maximum Connections allowed box, type a number that is greater than or equal to the maximum number of simultaneous connections for the RD Session Host server, and then click OK
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • PXE Boot a client to connect to a Remote Desktop Session Host/Terminal Server Farm via SCCM 2007

    Hi all,
    we've got a bunch of old desktops which are destined for disposal but i was wondering if we couldn't use them as disk-free clients to connect to our Remote Desktop farm. I did some digging and have managed to put together an iso which will boot
    the machine into WinPE and then connect to our farm. However, since it's an iso i have to use either a cd or usb for this to work. (This is pretty much what i did: http://www.iammacgyver.com/2011/02/easy-rdp-60-from-winpe-30-simple-boot.html) 
    What i want to do is to advertise the boot.wim to the client via SCCM so that it boots via PXE and then picks up the WinPE image and connect to the RD farm. I've imported the boot.wim file into SCCM under Boot Images and created an empty Task Sequence
    with the boot.wim as its Boot Image. I then advertised this Task Sequence to a collection which contains the old desktop clients. The machine PXE boots ok and loads up WinPE but rather than launch a remote desktop connection, it trundles through the normal
    WinPE stages and once it's finished 'Preparing Network Connections' it simply ends and the client reboots.
    Is what i'm trying actually possible?
    Can anyone tell me why the ISO works yet pushing the boot.wim out as a Boot Image doesn't? I know the boot.wim file (which is the same one present in the ISO) is ok since the client boots into WinPE fine when PXE booted so why doesn't the remote
    desktop session conenction launch? How is booting from the ISO different from booting from the PXE boot.wim file?
    Slightly long winded problem so many thanks in advance to anyone who can pass some info my way!

    It doesn't work because importing it into ConfigMgr injects binaries and the task sequence engine along with the process to launch the engine thus suppressing whatever you've got configured.
    Perhaps you could use a pre start command (pre-execution hook in 2007 parlance) to launch your RDP process though.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • The grace period for the Remote Desktop Session Host server has expired

    <p>I'm running Windows Server 2012, we only have 1 server and it's a DC.  I'm trying to RD to the server from my Windows 7 laptop. It was working fine on Friday but when I came in on Monday I got message saying that 'The remote session was disconnnected
    because there are no Remote Desktop License Servers available to provide a license'
    So after a bit of digging I found out my 'grace period' had expired, so ordered a new license which I got today, installed this all ok but still i cannot connect via RD I get the same message....went into the RD License Diagnoser and it said the problem
    was as follows
    'The grace period for the Remote Desktop Session Host server has expired, but the RD Session Host server has not been configured with any license servers. Connections to the RD Session Host server will be denied unless a license server is configured for
    the RD Session Host server.'
    Suggested Resolution as follows
    Configure a license server for the Remote Desktop Session Host server. If you have an existing license server, specify that license server for the RD Session Host Server. Otherwise, install RD Licensing on a computer on your network and Configure RD Session
    Host Server to use it.'
    I cannot figure out how to do this as I cannot find the RD Session Host Server tool. 
    Can any of you lovely people help me please

    Hello,
    Best option would be to assign the license server by using AD GPO. Youl will need to configure the following:
    Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing
    and define the settings for:
    Use the specified Remote Desktop License Server
    Set the Remote Desktop Licensing mode
    Then assign the policy tho your server.
    regards Robert Maijen

  • Windows 2012 R2 - Remote Desktop Sessions, RemoteFX, GPU, Blue Screen RemoteFX adaptor

    Nvidia GPU GRID K1
    Host Server - Dell Power edge R720 128 gig RAM 2 Xeon E5-2640v2 2.0GHz, 20M cache 8c
    Windows 2012 R2 full installation – Bios and all hardware with latest updates.
    Roles - Hyper V and Remote Desktop Virtualization Host
    EPT, GPU, WDDM (latest drivers) compatible for RemoteFX and fully up to date.
    I have disabled the video adaptor on the motherboard.
    I cannot complete with administrative permissions;
    dism /online /enable-feature /featurename:Microsoft-Windows-RemoteFX-EmbeddedVideoCap-Setup-Package
    Error: 0x800f080c
    Feature name Microsoft-Windows-RemoteFX-EmbeddedVidoCap-Setup-Package is unknown
    Question 1 - because video card on motherboard disabled, do I still need to complete this command?
    VM’s
    **I’m not interested in VDI but more Remote Desktop Sessions and the option to ‘pinch and zoom with Windows 8.1 tablets**
    VM1 - Windows 2012 R2 configured as generation 1 that is fully patched.
    This VM is able to start up and run until I add the new hardware for the RemoteFX Video adaptor from within the Hyper V settings. When I start the VM the server blue screens. I have tried multiple VM’s with 2012 but same thing
    If I created the VM as Generation 2 I am able to start the VM but the RemoteFX adaptor doesn’t appear in the device manager. I have read generation 2 isn’t compatible with RemoteFX.
    VM2 – *Testing purposes* - Windows 8.1 Enterprise configured as generation 1 that is fully patched.
    This VM I am able to start up and run the VDI after the RemoteFX video adaptor is installed, also the correct adaptor appears in the device manager. This seems to at least work correctly but I cannot pinch and zoom and the experience is poor.
    GPU summary within the Hyper V settings state there are 4 physical GPU’s all of which can be used with RemoteFX and that 1 virtual machine are using the GPU (Windows 8.1 enterprise VM)
    Firewalls off, latest RDP clients
    I have read you should be able to use Windows 2012 R2 and we should be able to use the sessions with pinch and zoom but now and then you come across something that tells me different.
    Question 2 – I need this to work with Windows 2012 R2 so we can use Remote Desktop Sessions 
    and the tablets can use pinch and zoom, anyone tell me what I may be doing wrong?

    Hi,
    Thank you for posting in Windows Server Forum.
    As per my research, you need to run the command although video adapter is disabled on motherboard. If you install the RemoteFX cap driver, the integrated video adapter is disabled while the operating system is running. 
    For more information you can refer beneath article.
    1. RemoteFX (with Hyper-V) is a serious business tool. For games.
    2. Configure RemoteFX in Hyper-V running Windows Server 2012 with low end GPU
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • [Forum FAQ] Troubleshoot the error "The Remote Desktop Session Host server is in Per User licensing mode and No Redirector Mode"

    Symptom
    RD License server is a key component of RDS. It licenses users to access RDS servers.
    After purchase the required RDS CALs, we need to activate the RDS License server and install the purchased RDS CALs. However, during the installation or after installation, we may face errors
    about RDS License.
    In most cases, the following error may occur.
    Error:
    The Remote Desktop Session Host server is in Per User licensing mode and No Redirector Mode, but license server "Server name" does not have any installed licenses with the following
    attributes:
    Product version: Windows Server 2012
    Licensing mode: Per User
    License type: RDS CALs
    Troubleshooting
    1. Check whether the RD License Configuration is configured properly and there are no Warnings in the Event.
    2. The License Server should be part of 'RD Server License' group in Active Directory Domain Services.
    3. Check if the Licensing Mode is correct.
    - To change the Licensing Mode we can use RD Licensing diagnose, PowerShell cmdlet and Group Policy.
    Via PowerShell cmdlet:
    To change the licensing mode on RDSH/RDVH:
    $obj = get-wmiobject -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
    $obj.ChangeMode(value)
    # Value can be 2 - per Device, 4 - Per user
    Via Group Policy
    Path: Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing
    Use the specified RD license servers = FQDN of server name
    Set the Remote Desktop licensing mode =
    Per User
    However, if issue persists, please provide detailed information and post the question in the
    Remote Desktop Services (Terminal Services) forum.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi Richard,
    You need to uninstall Remote desktop session host feature. After removing it, you will default two connections which does not need to purchase RD CALs'.
    Thanks,
    Umesh.S.K

  • Windows Server 2012 The licensing mode for the Remote Desktop Session Host server is not configured

    Hi
    I have a standard Windows Server 2012 that is hosted in the cloud by a hosting provider -
    This server has been up and running fir 6 months - recently we have been getting a warning
    "The licensing mode for the Remote Desktop Session Host server is not configured" - The Remote Desktop Session Host server is within its grace period, but the RD Session Host server has not been configured with any license server.
    Yet, we only use this with 2 connections as part of the standard licence agreement and this server is not used as a user's desktop only an ftp and web server- do therefore we do not need to purchase any cal licences (we have another server with the same
    hosting company that does not have this issue and has been up for 18months)
    Please can someone advise how I resolve this issue, the hosting company states that I must resolve it as they only host and resell the server licence
    Thank-you
    Richard Steele

    Hi Richard,
    You need to uninstall Remote desktop session host feature. After removing it, you will default two connections which does not need to purchase RD CALs'.
    Thanks,
    Umesh.S.K

  • Onscreen Keyboard appears when shadowing session on 2012R2 Remote Desktop Session Host

    As the title suggests, whenever I shadow a session on our 2012R2 RDSH server, the onscreen keyboard appears.  The taskbar also unlocks.
    Both of these behaviours mean that the user can tell when their session is being shadowed, which I don't always want to be the case - sometimes I want to be able to monitor the session without their knowledge.
    Anyone know how I can stop this from happening?

    Hi,
    Thank you for posting in Windows Server Forum.
    Yeah, we can use the following command where we can take user shadow session without giving him any notification, and no need to approve by the user.
    mstsc.exe /shadow:ID /v:ServerName /control /noConsentPrompt
    But for this, we need to set the following group policy:
    [Computer Configuration | User Configuration]
    \Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections
    Set rules for remote control of Remote Desktop Services user sessions:  Enable
    Select the option: Full Control without User’s permission
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • Can't quit directly from remote desktop session on OS X

    When I'm in a full-screen remote desktop session in Mavericks and I move the mouse to the top of the screen so the menu bar appears, selecting Quit from the File menu results in the session ending, but I have to select Quit a second time to actually exit
    the application.

    Hi,
    It seems to be a Mac related issue, I would like to suggest you contact Apple support for help.
    Thanks.
    Jeremy Wu
    TechNet Community Support

  • Xvnc hangs after exiting Remote Desktop session

    After closing a window of Remote Desktop session with XFCE Desktop run on latest ArchLinux, XRDP server exits, but Xvnc server started by that session keeps running, and within 5-10 min starts suddenly putting high load on CPU, while doing nothing useful.
    Why this happen, and how to auto close it when closing Remote Desktop window & session?

    While the hang reason is still unknown, I found that login out of XFCE from within open XRDP session window before closing the session will shutdown relevant processes on the server host, including Xvnc.

  • Windows 2012 + hyper-v + mouse not captured in remote desktop session + integrated services installed

    windows 2012 + hyper-v + mouse not captured in remote desktop session + integrated services installed

    Hi,
    I am using Server 2012 R2 with Hyper-V and CentOS 6.5 that installed GNOME.
    Same no mouse on remote desktop session or on the host's Hyper management interface.
    From my knowledge, CentOS from 6.4 build in include the IS, how do I update the IS in CentOS 6.4-6.5 guest OS? Any detail docunment for reference?
    Thank you.

  • P2055dn won't appear in RDP/Remote Desktop session

    I have an XP workstation which had a Laserjet 4100. When it connected to a 2003 Server running Terminal Services, the printer appeared, I could use an application on the server and get my printout at the 4100. Now I have replaced it with a P2055dn, but this printer won't show up at all. I have tried the following things:
    1) Install the standard PCL 6 driver, both on the workstation and the server
    2) Install the express network driver as above
    3) Install the Universal Print driver as above
    Nothing works.
    To be clear, the 2055dn is network attached, which is to say that the XP machine prints to it through a Microsoft Standard TCP/IP port. I specify this because for some reason the HP install routine insists on creating an HP Standard TCP/IP port. I'm not sure what the difference is, but the port I used beforehand was a Microsoft one, so I stuck with that.
    I have other printers that the XP machine connects to in the same way, and those show up and print without issue.
    I have seen posts about host-based printers not working, but I was told by the HP tech that the 2055 is NOT host-based.
    Any clues ?

    I originally posted this for a 1022printer but it applies across the board to HP printers.  I have yet to see this pop onon other networked printers.  My HP 990c works just fine as does ny LJ5, etc.
    After many months of frustration and 7 1/2 hours with Microsoft advanced prof support I've finally pinned down this printer and a slew of others.  This problem as far as I have come across deals exclusively with HP printers.  In simple terms:  the drivers are flawed.  This 1022 is a prime example.  It prints locally and via TCP/IP just fine. I have about 7 other printers and dummy printers in my printer folder.  Enter a remote desktop session and ALL of them populate except the 1022.  This shows that the hooks and RDT finders are locating your printers and installing them properly as remote printers.  All except the 1022. 
      Log out of your RDT session: goto the local 1022 setup and change the printer driver to a PCL driver.  I used a 1200 PCL driver.  Now log back into your RDT server and hockus pocus! there is your printer.  Totally un-usable because the driver will not run this printer.  Caveat:  each time I did this XP crashed (I couldn't get to the properties TAB anymore -- I had to un-install the 1022 and then re-install it with at least 1 reboot in the process)
    Moving on we go to the HP OfficeJet/LajerJet2840.  Same thing.  It won't pass through as remote printer in RDT.  Go local.  Set the printer driver to AppleLaserWriter8500 and boom. (same logout, change, back in steps) and your LJ2840 shows up and works.
    While I will have to wait until tomorrow I am betting that this will fix the exact same problem with the HP Officejet 8500A all in one with the exact same problem.
    Hey HP?  Whats with the drivers??
    Another work around if you have a static enough environment is to install your local printer that will not show up under RDT on the server, and then point the port to your fixed IP on your router, and passthru port 9100 to your locally installed printer that is failing.  You can now be on RDT and chooses the network printer that is printing to the TCP address of your home (or office) router.

  • Keyboard losing focus while in remote desktop session

    Hi,
    I have several Win7 computers that remote into a hosting company's server. Our users will log into the hosting company's servers via remote desktop. The issue that keeps coming back is that the keyboard will stop functioning after a user locks the computer
    then returns after a short period of time to continue working. The remote desktop session will remain working while the pc is locked. After unlocking the computer the keyboard will not work in the remote session. The mouse isn't affected by this and minimizing
    the session, the keyboard works fine on the local session. Sometimes you have to restore down then restore back or minimize the RDP session several times to get the keyboard to work inside the remote session. On a few occasions, ending the RDP session
    will cause the keyboard to work again. Anyone experienced this and have a resolution for this issue? This issue appears to be occurring more frequently and we have already recreated user profiles on the remote server but to no avail. Thank you for your help.

    Hi Nicholas,
    I have this issue aswell, and it has traveled with me over a switch if computers. So I suspect there is something with my user account/profile or similar. My colleague does not have the issue. 
    I also tried the hotfix but I received a message that the hotfix doesn't apply to this computer. The
    pc is a windows 7 Enterprise 64-bit. What can I do to resolve this?
    Any way to reset my Remote-desktop-cache or settings for my user account perhaps, start from scratch. 
    Best regards
    - Björn

Maybe you are looking for