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

Set Maintenance-Mode from VDA-side in StartUp-Script (PowerShell)


Donald Donovan

Question

Hello,

 

I want to use Citrix broker-cmdlets in a Computer StartUp-script on the VDAs.
For example I want to enable Maintenance-Mode, prepare the VDA and then disable Maintenance-Mode again.

 

Ofc I have installed the PowerShell-SnapIn on the VDA and I am able to use it. For example I can run the following command with my user:

Set-BrokerMachine -MachineName "domain.local\$env:COMPUTERNAME" -AdminAddress "DeliveryController.domain.local" -InMaintenanceMode $True


But when I use such a command in a Computer StartUp-script it is not working, because the script is running in context of the system-user.

The system-user may be powerful, but it does not have permissions in Citrix XenApp. I did simulate it with PSExec:

PSExec.thumb.PNG.bcef78a305239521d30eb303447aa5a7.PNG

 

I think I am not the first one, who has such a demand.

What are the possibilities? Do you have any good ideas?

 

I did workaround by using Invoke-Command with New-PSSession running the command remotly on the Delivery-Controller, but this involves a lot of things and I don' like this solution.

 

Thank you!

Link to comment

6 answers to this question

Recommended Posts

  • 0

I gathered that, but what do you need to do to "prepare" an image once it's started up? Do you have a set of tasks, scripts, software deployments etc? Are you using mcs, pvs or no provisioning?

 

Tools such as BIS-F can delay the start up of the citrix desktop service for a set amount of time, which delays registration - but there are also other things that may help depending on what your specifics are 

Link to comment
  • 0

I am using PVS. Everything else is not relevant in this context.

As with XenApp 6.5 the part looked like this:

Change Logon /Disable

# Run relevant tasks

Change Logon /Enable

 

I want to get back to the request in my first post - In short:

I have the demand to run Citrix broker-cmdlets (PowerShell) in a Computer startup-script, which is running in context of system-user. (details in first post)

Link to comment

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