***UPDATE***
Here is the source: http://poshcode.org/1910
*************
I recently ran into a very interesting scenario with RDC RemoteApp. Basically, we had a client that was using RDC RemoteApp to deploy a medical related application. For their deployment scenario they wanted to create and distribute RDP files to remote users who were not on the organization’s internal network. After semi-going live with their deployment they turned to us and asked, “What about password changes?”
To be honest, I never gave password changes much thought with RemoteApp. After all, with most deployments the user has a desktop that is a member of the domain or they are coming through Web Access and we can front the password changes with something like UAG. However, with just RemoteApp via an RDP file on a non-domain member machine there really isn’t a way for users to change their password. Yes, you heard me correctly… there isn’t a way for users to change their password or get notified about impending password expiration.
To understand why this is the case you have to take two things into consideration about RemoteApp. First, the primary feature of RemoteApp is that it provides seamless windows. In other words, the application looks like it is running locally on the user’s machine. Secondly, to achieve its seamless windows magic, RemoteApp does not use Windows Explorer as the user’s shell on the RDS Session Host server. Instead, it uses RDPSHELL.EXE which loads a set of Windows event hooks into the user’s session that allow it to monitor and manage the state of all windows on the desktop. As a result, the following things are true about a RemoteApp session:
So… how does one work around the features of RemoteApp to allow users to change their passwords? Well the solution that I came up with involves PowerShell. While I can’t necessarily publish the source code, I can describe what I did.
Overall, I needed to provide users with a GUI to change their passwords. However, to work around RemoteApp, I had to basically write a PowerShell based GUI that was then published as the intended application. Then depending on the outcome of this GUI the actual intended application was started and the password change GUI was closed. To create the password change solution the following steps were used:
Hopefully this helps someone…
If you like this, check out some other posts from Tyson:
Or if you want, you can also check out some of Tyson's latest publications:
Lastly, visit the Microsoft Subnet for more news, blogs, and opinions from around the Internet. Or, sign up for the bi-weekly Microsoft newsletter. (Click on News/Microsoft News Alert)
With more than ten years of experience in IT, Tyson Kopczynski has become a specialist in Active Directory, Information Assurance, Windows automation, PKI, and IT security practices. Tyson is also the founding author of the Windows PowerShell Unleashed series and has been a contributing author for such books as Microsoft Internet Security and Acceleration (ISA) Server 2006 Unleashed and Microsoft Windows Server 2008 R2 Unleashed. He has also written many detailed technical papers and guides covering various technologies. As a consultant at Convergent Computing, Tyson works with and provides feedback for next generation Microsoft technologies since their inception and has also played a key role in expanding the automation and security practices at CCO. Tyson also holds such certifications as the Certified Information Systems Security Professional (CISSP), the SANS Security Essentials Certification (GSEC) and SANS Certified Incident Handler (GCIH), and the MCTS (Application Platform, Active Directory, and Network Infrastructure).
Certifications:
Publications:
Other Stuff: