Jump to content
Welcome to our new Citrix community!

NetScaler Gateway Support for PowerShell Login Script


Recommended Posts

For full vpn connections, the session policy can do this. Look in the session profile under:  Client Experience (advanced settings) > General: Enable login script / logout scripts. See tool tip for syntax using environment variables or multiple scripts.   Will require script to be in the path specified for the client to see.

 

Probably limited to windows devices (maybe mac).

 

I don't recall if the admin guide has any more details, but it would be in the session profiles section.

Link to comment
Share on other sites

Can you provide any supporting documentation? The only thing i can find is article CTX135430 which says that only CMD or BAT are supported.

 

When i tested it did not work. I could run a batch file and I could run the PS1 in a batch by specifying -no exit. When running it directly I log an error 93 (or 193)

 

Thank you for the responding

Edited by jcacchi560
Link to comment
Share on other sites

Sorry, I was referring to running a script in general and wasn't thinking powershell specifically.

Yeah, you would have to call a .bat or .cmd for it to work. It only supports the file types listed so you would have to "wrap" the script.

Then you might need the start /wait command or other mechanism to wait on powershell completion:  https://stackoverflow.com/questions/2041799/powershell-script-gets-stuck-doesnt-exit-when-called-from-batch-file

 

Again, sorry I didn't note the login script limitation of the vpn client; was just remembering it could do login scripts.

Link to comment
Share on other sites

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...