Debugging steps for Citrix XenApp running PowerShell Scripts

  1. Ensure you are invoking appropriate version of PowerShell to run your PS script
    1. Use C:Windowssyswow64Windowspowershellv1.0powershell.exe for 32-bit
    2. Use C:Windowssystem32Windowspowershellv1.0powershell.exe for 64-bit
  2. When you are invoking 32-bit/64-bit script for the first time on the system, ensure that appropriate ExecutionPolicy is set for the environment. If ExecutionPolicy is set to restricted PS shell just exits after launch.
  3. In case if your script making any ADO connections, ensure that proper driver names are used for example: You’ll see “Driver={Microsoft Access Driver (*.mdb, *.accdb)}” on systems running Access application whereas on systems that don’t have Access installed the driver will be named as “Driver={Microsoft Access Driver (*.mdb)}”

0 thoughts on “Debugging steps for Citrix XenApp running PowerShell Scripts

  1. My Powershell script will not run at logoff. Is this an issue you have seen before Govardhan? Commands in the batchfile run file (i.e. copying files etc) but calling the Powershell does not work. The logon script with Powershell works fine, it’s only a logoff problem…

Leave a Reply

Your email address will not be published. Required fields are marked *