Jump to content
Welcome to our new Citrix community!
  • 0

Get-XDAuthentication -ProfileName "xxxxx" works in script but not when run by a scheduled task or calling from CMD


Peter Hopkin1709156713

Question

Hi all,
I have a script which basically perform the following actions

Get-XDAuthentication -ProfileName "Default"

Get-BrokerMachine

 

When running this in a powershell window the script works fine and i get the results.

When I run the script within a scheduled task it fails to produce the results.

When i ran the exact command from the schedule task within a CMD I see the Citrix Authentication window appear . This is an example of the command and what would be entered in to the scheduled task 
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File ScriptPathAndName.ps1

I am running all of the above within the same login. This indicating to me that the Get-XDAuthentication -ProfileName "Default" i snot finding the profile for some reason.

Any suggestions please

thanks

Peter

Link to comment

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...