Deploy ownCloud Desktop Client with Configuration Manager and GPO (MECM/SCCM)

Prerequisites:

  • Active Directory domain with Windows 10 clients
  • System Center Configuration Manager 2012 and above
  • SCCM/MECM clients installed, configured and healthy
  • ownCloud default configuration file
  • PowerShell script

High level solution overview:

  1. MECM deploys ownCloud application as .msi file with custom parameters prevents reboot on all computers require this app.
  2. GPO linked on all affected users creates a folder structure for every logged user:
C:\Users\%LogonUser%\oc-sync

%AppData%\owncloud
  1. GPO copies the default configuration file from a shared folder (available for all affected users) to %AppData%\owncloud .
  2. As a logon script assigned on users PowerShell script edits default configuration file and adds active logged user credentials into default configuration file.
  3. When user runs ownCloud app installed from MECM ownCloud uses custom configuration file.

Create the Configuration Manager application

  1. In the Configuration Manager console, choose Software Library > Application Management > Applications .
  2. On the Home tab, in the Create group, choose Create Application .
  3. On the General page of the Create Application Wizard , choose Automatically detect information about this application from installation files . This pre-populates some of the information in the wizard with information that’s extracted from the installation .msi file. Then specify the following information:
  • Type : Choose Windows Installer (*.msi file) .
  • Location : Type the location (or choose Browse to select the location) of the installation file (eg.!) ownCloud-2.8.0-daily20210325.3588.x86.msi . Note that the location must be specified in the form \Server\Share\File for Configuration Manager to locate the installation files

  1. Choose Next . On the Import Information page, you’ll see some information about the app and any associated files that were imported to Configuration Manager. Once you are done, choose Next again.

  1. On the General Information page, you can supply further information about the application to help you sort and locate it in the Configuration Manager console.

Change the Installation program from default to

msiexec /i "ownCloud-2.8.0-daily20210325.3588.x86.msi" /passive SKIPAUTOUPDATE="1" ADDDEFAULT=ALL DO_NOT_SCHEDULE_REBOOT=1

  1. Choose Next . On the Summary page, you can confirm your application settings and then complete the wizard.

Add the application content to a distribution point

  1. In the Configuration Manager console, choose Software Library.
  2. In the Software Library workspace, expand Applications. Then, in the list of applications, select the ownCloud that you created.
  3. On the Home tab, in the Deployment group, choose Distribute Content.
  4. On the General page of the Distribute Content Wizard, check that the application name is correct, and then choose Next.
  5. On the Content page, review the information that will be copied to the distribution point, and then choose Next.
  6. On the Content Destination page, choose Add to select one or more distribution points, or distribution point groups on which to install the application content.
  7. Complete the wizard.

Deploy the application

  1. In the Configuration Manager console, choose Software Library > Application Management > Applications .
  2. From the list of applications, select the application that you created earlier ( ownCloud ), and then, on the Home tab in the Deployment group, choose Deploy .
  3. On the General page of the Deploy Software Wizard , choose Browse to select the proper device collection that contains.
  4. On the Content page, check that the distribution point from which you want PCs to install the application is selected.
  5. On the Deployment Settings page, make sure that the deployment action is set to Install , and the deployment purpose is set to Required .
  6. On the Scheduling page, you can configure when the application will be installed. For this example, select As soon as possible after the available time .
  7. On the User Experience page, choose Next to accept the default values.
  8. Complete the wizard.

Create the GPO for PowerShell script deployment

  1. Run the domain policy management console – GPMC.msc (Group Policy Management), create a new policy and link it to the desired Active Directory container with users required ownCloud application. Switch to policy Edit mode.
  2. Go to the GPO section: User Configuration -> Policies -> Windows Settings -> Scripts (Logon/Logoff) -> Logon setting.
  3. Click on PowerShell Scripts tab, click Add… and Browse .
  4. Now you need to copy the file with your PowerShell script to the domain controller. The console will automatically open the folder \\yourdomainname\SysVol\yourdomainname\Policies\GPO_GUID\User\Scripts\Logon:

  1. Choose this file and provide additional settings:

Script parameters: -ExecutionPolicy Bypass

Click OK , then For this GPO, run scripts in the following order: Run Windows PowerShell scripts last :

Then click OK . and do not close Group Policy Management console.

Edit created GPO for a default configuration file deployment

  1. Go to the GPO section: User Configuration -> Preferences -> Windows Settings -> right click on Files – New - File . On General tab choose Action: Create and specify a path on shared folder available for all affected users as a Source File . As a Destination File specify %AppData%\owncloud\owncloud.cfg :

  1. Go to the GPO section: User Configuration -> Preferences -> Windows Settings -> right click on Folders – New – Folder .

Action: Create

Path: C:\Users%LogonUser%\oc-sync

  1. Go to the GPO section: User Configuration -> Preferences -> Windows Settings -> right click on Folders – New – Folder .

Action: Create

Path: %AppData%\owncloud

  1. Close the Group Policy Management console.