In a Citrix XenApp 6.0 environment I use a lot of powershell scripts to get things going. For example during logon of a user some scripts are used to copy program settings to the user profile. Under PowerShell 2.0 everything went fine.
After the release of PowerShell 3.0 we updated the environment with the latest version of PowerShell including the required full installation of Microsoft .NET Framework 4. Everything worked out great. All the scripts worked. Until a week ago.
When a user logged on to Citrix server PowerShell stopped working and showed a pop-up with the comment: Windows PowerShell has Stopped working. Windows can check online etc..
Because it worked fine for a few week I expected an update of some kind. So I started uninstalling the latest installed updates. Starting with the .NET Framework 4 updates. Then Windows updates. After uninstalling all updates the problem wasn’t solved.
After 1,5 day of troubleshooting it was time to start using ProcMon. After some monitoring I saw an access denied error write access required on the machine.config file of Framework 4. All .NET Framework versions use basic configuration settings and defaults from a file named: systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config. Checking the security on the file only administrators had Full Access rights. After changing the security to Modify rights for all domain users the problem was solved.
I hope this information will save you time troubleshooting the same problem. If this helped you solve your problem let me know and leave a comment.