How to deploy Containers with an Active Directory Group Policy Object (GPO)
This article is intended for Administrators who want to deploy their applications to servers and desktops using Active Directory (AD) membership and Group Policy Objects (GPOs).
The following example assumes the Container is:
- Called AppContainer
- Stored on the UNC share \\share\data\containers
- To be deployed to the C:\programdata\cloudhouse folder on the target server, or desktop.
- Create a batch script containing the following command:
\\unc\path\container-folder\Cloudhouse.Container.Deployment.exe --deploydir C:\programdata\cloudhouse /acceptEULA
- Test the script executes correctly when run as an Administrator.
- Open the Group Policy Management Console.
- Create a new Group Policy Object (GPO) on the organizational unit (OU) in which your computer accounts reside. You may use an existing GPO.
Creating a New GPO
To create a new GPO:
- Open the Group Policy Management Console
- In the console tree, right-click Group Policy Objects in the forest and domain in which you want to create the GPO.
- Click New
- In the New GPO dialog box, specify a name for the new GPO and click OK
- Open Computer Configuration\Policies\Windows Settings\Scripts (Startup/Shutdown)
- In the details pane, double-click Startup
- In the Startup Properties dialog box, click Add
- In the Add a Script dialog box, under Script Name, type the full network path to the script batch file and the script batch file name created in Step 1. Or you can click Browse to search for the script file in the Netlogon shared folder on the Domain Controller.
- Close the Group Policy Management Console
- Test the GPO, open Command Prompt and run it as an Administrator.
- Run the gpupdate /force command at the command prompt to refresh the group policy.
- If the GPO is working, the application in the Container will be installed when the server starts up.