ZCO Installation through GPO

Revision as of 06:40, 18 October 2022 by Dawood Shaikh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ZCO Installation through GPO

   KB 24482        Last updated on 2022-10-18  




0.00
(0 votes)


Overview

  • By default, GPO detects Arabic as the selected language for ZCO installation via GPO; however, in order to install ZCO via GPO, the appropriate language must be set in ZCO MSI.
  • Once you have selected the appropriate language in ZCO MSI, you must create the Group Policy Object on the Windows server.
  • Optionally, You can also use the Group Policy Object (GPO) to create an Outlook profile automatically during ZCO installation.

Set the appropriate language in ZCO MSI in order to deploy it via GPO

1. You need to install the Orca MSI editor. Install the Windows SDK from - https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

2. Click the Download the installer button. It will download the winsdksetup.exe setup file.

3. Run the winsdksetup.exe setup file. It will open the dialog with two options.

4. Select the second option Download the Windows Software Development Kit-Windows 10.x.xxxxx for installation on a separate computer. Click on Next.

5. De-select all options and only select MSI Tools.

6. Click Download.

7. Go to the download path selected above. You can find the Orca-x86_en-us tool.

8. Double-click on the Orca tool to install it.

9. Launch Orca Tool.

10. In the Orca Tool,

Click on File -> Open and select the ZCO MSI file that you want to install.
Click on View -> Summary Information. 
On the Edit Summary Information dialog, remove all languages other than your preferred language. 
Click Ok.

The following are supported Language and codes:

Language Code Locate
1033 English - United States
1030 Danish
1031 German - Germany
3082 Spanish - Spain (Modern Sort)
1036 French - France
1040 Italian - Italy
1041 Japanese
1043 Dutch - Netherlands
1046 Portuguese - Brazil
1049 Russian
1053 Swedish - Sweden
1025 Arabic - Saudi Arabia
1081 Hindi
1042 Korean
1045 Polish
1055 Turkish
2052 Chinese - People's Republic of China
3076 Chinese - Hong Kong SAR
1028 Chinese - Taiwan
1038 Hungarian
1048 Romanian - Romania
1058 Ukrainian
1054 Thai
2070 Portuguese - Portugal
1086 Malay - Malaysia
1060 Slovenian
1037 Hebrew
1057 Indonesian
1027 Catalan
1044 Norwegian (Bokmål)
1066 Vietnamese


11. Save the file and exit. Now ZCO MSI file is ready for installation via GPO.

Create a Group Policy Object (GPO) for ZCO installation on a Windows server

1. Create a Organizational Unit(OU).

  Open the "Server Manager".
  Navigate to Tools -> "Active Directory Users and Computers"
  Select Domain Name -> Right Click on Domain -> Select "New" -> Select "Organizational Unit"
  Choose name for the Organizational Unit, e.g. 'ZCO-GPO-Deployment-OU', and then click "OK."
  Navigate to the "Computers" section. Select the computers on which ZCO installation is required, then right-click on them and select "Move." Select the Organizational 
  Unit, for example, 'ZCO-GPO-Deployment-OU,' and then click OK. The machines will be relocated to the OU 'ZCO-GPO-Deployment-OU.'
  • Note: Please do not move machines that already have ZCO installed to the OU created. Otherwise, ZCO will be reinstalled on those machines.

2. Create a shared network folder

  Create a shared network folder (e.g. 'ZCO-Network-Folder') where you'll put the ZCO Installer package (.msi file) that you want to distribute.
  Copy the ZCO MSI file (in which we have set the appropriate language) to the folder 'ZCO-Network-Folder'.
  Now we need to share the "ZCO-Network-Folder" folder. Right-click on it -> Properties.
  Select the "Sharing" tab. Click on "Advance Sharing."
  Select "Share this folder". (In order to make it hidden from the network, you may put a $ sign at the end of 'Share name:')
  Click on the "Permission" button below.
  Remove "everyone" from "Share Permission" and add group "Authenticated Users" and specify "Full Control."
  Click Apply and OK.

3. Create a Group Policy Object

  Go to "Server Manager" -> "Select Tools" -> "Group Policy Management"
  From Domains, expand your domain. Select the OU created in step 1, namely 'ZCO-GPO-Deployment-OU.'
  Right-click the OU and choose "Create a GPO in this domain and Link it here."
  Give a name to the GPO, e.g., "ZCO-Installation" Click "Ok." (A group policy created under your domain)
  Select the newly created GPO and click the "Add" button in the right window. Type "Domain Computers" and click OK.

4. Add ZCO package to GPO

  Select the Group Policy "ZCO-Installation" and right click and select "Edit". (It will open the "Group Policy Management" Editor.)
  In 'Computer Configuration', select "Policies" -> "Software Settings" -> "Software Installation"
  Right Click on the empty area on the right side and select "New" -> "Package".
  Now browse and select the shared folder from the 'Network' tab, i.e., \\<Network-Path>\"ZCO-Network-Folder" and select the ZCO MSI file. Click on "Open." Click OK on the 
  "Deploy Software" dialog.
  Now you can see the ZCO MSI package has been added in 'Software Installation'.
  Now select "Policies" -> "Administrative Templates" -> "System" -> "Group Policy"
  Double-click on "Specify startup policy processing wait time" in the right window -> Select "Enabled." In addition, set "Amount of time to wait (in seconds)" to "60."
  Now select "Policies" -> "Administrative Templates" -> "System" -> "Logon"
  Double-click on "Always wait for the network at computer startup and logon" in the right window -> Select "Enabled."
  Choose "Policies" -> "Software Settings" -> "Software Installation" now. Select the package in the right window and right-click it. Select "All Task" -> "Redeploy 
  Application" and click "Yes."
  Close the "Group Policy Management" Editor.
  • Note: In order to create a user profile automatically, follow this section.

5. Install ZCO using GPO

  Open the Windows Power Shell and run the below command.
  PS C:\Users\Administrator> $computers = Get-ADComputer -Filter 'Name -ne "MY-Domain-Controller-Name"'
  PS C:\Users\Administrator> $computers | ForEach-Object -Process {Invoke-GPUpdate -Computer $_.name -RandomDelayInMinutes 0 -Force}
  Wait a minute after running Gpupdate on remote machines, then run the following command to restart the machines.
  PS C:\Users\Administrator> $computers | ForEach-Object { Restart-Computer -ComputerName  $_.name }
  • Note: Remotely restarting the client machine will only work if no user is currently logged in.

It will install the ZCO automatically.

6. Un-install ZCO using GPO

  Select the Group Policy created, i.e., "ZCO-Installation".
  Select the ZCO MSI package. Right click on it -> Select All Task -> Remove Package.
  Now execute the preceding step 5 mentioned above (i.e. 5. Install ZCO using GPO)
  This will uninstall the ZCO remotely. 
  • Note: If ZCO was installed via GPO, it is recommended that it be uninstalled via GPO only.

7. Upgrade ZCO using GPO

  Go to "Server Manager" -> "Select Tools" -> "Group Policy Management"
  Select the Group Policy "ZCO-Installation" and right click and select "Edit". (It will open the "Group Policy Management" Editor.)
  In 'Computer Configuration', select "Policies" -> "Software Settings" -> "Software Installation"
  Select the ZCO MSI package. Right click on it -> Select All Task -> Remove Package.
  Now, right click on the empty area and select "New" -> "Package".
  Now browse and select the shared folder from the 'Network' tab, i.e., \\<Network-Path>\"ZCO-Network-Folder" and select the New ZCO MSI file which you want to upgrade. 
  Click on "Open." Click OK on the "Deploy Software" dialog. (Please keep in mind that you have already configured the appropriate language in New ZCO MSI in order to 
  deploy it via GPO.)
  Now you can see the ZCO MSI package has been added in 'Software Installation'.
  Select the newly added ZCO package and right-click it. Select "All Task" -> "Redeploy Application" and click "Yes."
  Now execute the preceding step 5 mentioned above (i.e. 5. Install ZCO using GPO)
  This will upgrade the ZCO package using GPO.

Troubleshooting steps

If the ZCO installation does not occur on the client machine after the above configuration, login to the client machine, open the command prompt as administrator and run Rsop.msc to gather computer policy information. In the Resultant Set of Policy window, click on Computer Configuration -> Software Settings and choose Software Installation. Observe that Zimbra Connector for Microsoft Outlook must be listed in the right window which indicates that Group Policy is successfully applied on the client machine.

Create an Outlook profile automatically with the Group Policy Object (GPO) using User Logon Scripts

1. Create another Group Policy at the Domain level to execute the script.

  Go to "Server Manager" -> "Select Tools" -> "Group Policy Management"
  From Domains, expand your domain.
  Right-click the Domain and choose "Create a GPO in this domain and Link it here."
  Give a name to the GPO, e.g., "ZCO-Script-Installation" Click "Ok." (A group policy created under your domain)
  Select the newly created GPO and click the "Add" button in the right window. Type "Domain Computers" and click OK.

2. In the right window select the Delegation tab.

3. Add the Authenticated Users with Full Permission (Authenticated Users -> Advanced -> Full Control) to execute the script using our GPO.

4. Right-click on the group policy and select Edit.

  Now select "Policies" -> "Administrative Templates" -> "System" -> "Group Policy"
  Double-click on "Specify startup policy processing wait time" in the right window -> Select "Enabled." In addition, set "Amount of time to wait (in seconds)" to "60."
  Now select "Policies" -> "Administrative Templates" -> "System" -> "Logon"
  Double-click on "Always wait for the network at computer startup and logon" in the right window -> Select "Enabled."

5. Expand User Configuration -> Policies -> Windows Settings. Select Scripts (Logon\Logoff)

6. Double Click on Logon in the right pane. It will open the Logon Properties" dialog.

7. Click on the Show Files button at the bottom, It will open the location where you need to paste the Script.bat (Notable aspects -> Script.bat)

8. Edit the Script.bat and modify the script with the appropriate domain name, port, and generic password.

9. Now again go to the Logon Properties dialog and click theAdd button, browse the location where the script is located and select the script file. Click Ok.

Refer to Install ZCO using GPO section to start the installation.

Notable aspects

1. Setting startup scripts to run synchronously may cause the boot process to run slowly. Once the profile is created remove the Logon script.

2. If the incorrect password is entered in the script below, it will create an empty ZCO profile. In that case, the user will see a dialog, in which all other fields are pre-populated and the user only needs to enter the password.

3. The script below will only create a ZCO profile once. Before running the CreateZCOProfile.exe, it will check for the log file at location %temp%\ZCOCreateProfile.log. If the log file exists, the profile creation will be skipped.

4. Do not add computers where ZCO is already installed to the security group Members tab. Else the ZCO will be reinstalled on these machines.

5. To run the script, the administrator must enter the domain name and port number in the below script.

  • Note: Windows logged-in user must be present on the Zimbra server. Also In order to successfully create the ZCO profile, the generic password must be provided in the script below.

Script.bat

@echo off
Rem Please specify Domain name, Port, Generic Password for users.
set DomainName=<zimbra_server_name>
set /A Port=443
set GenericPassword=<password>
Rem Don't modify below section
set UserName=%USERNAME%
set EmailID=%USERNAME%@%DomainName%
set /A EnableSSL=1
set /A SetAsDefaultProfile=1
reg add "HKCU\Software\Zimbra" /v ZimbraServerName /t REG_SZ /d %DomainName% /F
reg add "HKCU\Software\Zimbra" /v ZimbraServerPort /t REG_DWORD /d %Port% /F
timeout /t 60
IF EXIST %temp%\ZCO_CreateProfile.log (
echo profile already created
) ELSE (
start CreateZCOProfile.exe %UserName% %DomainName% %Port% %EnableSSL% %EmailID% %GenericPassword% %SetAsDefaultProfile%
)


Jump to: navigation, search