I want to create a script that will allow terminal users (Citrix XenApp) that will allow a normal user to close opened IE on multiple terminal servers. I created a script that is doing just that, but the problem is, it works only on the user which generated the security string. So i changed the security token to the password in plain text but the code stoped to work. Is showing all process but is now getting the user session ID. Do you have any suggestions? Here is the code:
It’s very bad risk management practice to embed plain text passwords in script files. You should always prompt for them. You can then store them in a secure file or windows credential manager or PS JEA to do this more securely.
As for …
I created a script that is doing just that, but the problem is, it works only on the user which generated the security string
This is by design. Any script or cannot natively get the currently logged on user full credentials and run with that, imagine the security risk to that. They user must specifically supply those.
PowerShell Credentials Manager
CredMan.ps1 is a PowerShell script that provides access to the Win32 Credential Manager API used for management of stored credentials.