I have recently found that the powershell scripts contained in TA-XA6x-Server are not working anymore on my Citrix servers.
The TA-XA6x-Server bundled with the Splunk apps "Template for Citrix 6.5" contains the following powershell scripts that are not working anymore on our Citrix servers:
GetXAServerSession6x.ps1
GetXAServerLoad6x.ps1
I ams suspecting that this is due to some permissions on the Windows server, but I have no clue on finding what is the issue underlying.
Please help me to do the following:
- enable the Debug on these powershell scripts
- identify the underlying problem
- fixing the permissions required for the powershell script to work.
On the citrix servers that are executing the TA-XA6x-Server, their splunkd.log file contains the below errors lines :
08-25-2016 11:51:42.814 +0800 ERROR ExecProcessor - message from "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command " &'C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-XA6x-Server\bin\powershell\GetXAServerLoad6x.ps1'" -index system_citrix_6.5_ap" Get-XAFarm :
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-XA6x-Server\bin\powershell\GetXAServerLoad6x.ps1:8 char:13
+ $FarmName = Get-XAFarm | select -ExpandProperty FarmName
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-XAFarm], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,Citrix.XenApp
.Commands.GetFarmCmdlet
Get-XAServerLoad : The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-XA6x-Server\bin\powershell\GetXAServerLoad6x.ps1:11 char:1
+ Get-XAServerLoad -ServerName $env:COMPUTERNAME| foreach-object {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-XAServerLoad], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,Citrix.XenApp .Commands.GetServerLoadCmdlet
08-25-2016 11:52:12.813 +0800 ERROR ExecProcessor - message from "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command " &'C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-XA6x-Server\bin\powershell\GetXASession6x.ps1'" -index system_citrix_6.5_ap" Get-XAFarm :
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs. At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-XA6x-Server\bin\powershell\GetXASession6x.ps1:8 char:13
+ $FarmName = Get-XAFarm | select -ExpandProperty FarmName
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-XAFarm], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,Citrix.XenApp
.Commands.GetFarmCmdlet
... View more