Automating FileCloud Sync/Drive/OutLook-Addin Installation and Mass Deployment configuration
Disclaimer
The following script has been created with the purpose of providing you with an example of how to install/mass deploy FileCloud Sync without user interaction and at the same time to automate the FileCloud's mass deployment configuration for the end user.
Requirements
- The PowerShell script, Bat file or Executable depending on your preference must be ran with elevated admin privileges.
- In case there is any download restriction created by your Firewall you will need to add https://patch.codelathe.com to your allow list.
- FileCloud Sync must not be installed, If so proceed on uninstalling it and delete the folder under C:\Users\%username%\AppData\Roaming\FileCloudSyncData\client
- You will need to update the script to customize and or add any mass deployment configuration needed, the ones provided are used for demonstration purposes. For example to update the URL you will need to modify line 134 to reflect your own URL rather than https://your-filecloud-url.com
What does the Script do?
The script below will accomplish the following actions when executed.
- Change the Execution Policy on PowerShell to allow the scripts execution without any user intervention.
- Validate if there is any log file under the name FileCloudSync_SilentInstaller.log within the C drive if so it will delete it and recreate it.
- Validate if FileCloud Sync is already installed, If so the script will exit.
- Create a directory under the C drive called FileCloudSync in which it will be used to download the FileCloud installer.
- Download FileCloudSync.msi directly from FileCloud's server.
- Validate if the installer has completely download and ensure that the installer was not altered during transit, this is done by validating the installers AES 256 hash. If the hash is not the same the installer will exit.
- Proceed on silently installing FileCloud Sync without the need of any user input or interaction.
- Create the registry entry for FileCloud's Mass Deployment configuration
- Create the needed keys to assign the predefined settings based on FileCloud's Mass Deployment documentation
- Once completed it will start FileCloud Sync, Delete the folder created, Delete the FileCloud Sync installer and Exit.
FileCloud Sync Installation & Mass Deployment automation - Video
FileCloud Sync Installation & Mass Deployment automation - Script
FileCloud Drive Installation & Mass Deployment automation - Video
FileCloud Drive Installation & Mass Deployment automation - Script
FileCloud Outlook Addin Installation & Mass Deployment automation - Script
Creating a .bat file to execute the script
Once created your PowerShell script based on the example above you can automate its execution by creating a .bat file, for details view the example below.
Using a notepad or a text editor create a new file with the following content
echo on FileCloud Silent Installer and Mass Deployment Configuration cd C:\Users\%username%\Downloads Powershell.exe -File "FileCloudSync_Silent_Installer.ps1"
- Once done save the file as a .bat
- Before executing it you will need to have both, the .bat file and the .ps1 file on the same location as per this example it should be under Downloads.
- Right-click run as administrator.
Converting the PowerShell script to an executable
Once created your PowerShell script based on the example above you can automate its execution by creating an executable file, for details view the example below.
Run PowerShell as an administrator and run the following to install and import the ps2exe module
Install-Module ps2exe
Once the above is completed enter "Y" to install the Module
Once the module has been installed you can convert the .ps1 to .exe by running the following command
Invoke-ps2exe .\NAME-OF-YOUR-SCRIPT.ps1 .\FileCloud_Silent_Installer_and_Mass_Deployment.exe
- Your end result should be a executable for details, review the following: