{"id":353664,"date":"2024-08-27T10:09:34","date_gmt":"2024-08-27T10:09:34","guid":{"rendered":"https:\/\/www.ninjaone.com\/script-hub\/automatiser-installation-de-connectwise-screenconnect\/"},"modified":"2024-10-13T19:09:31","modified_gmt":"2024-10-13T19:09:31","slug":"automatiser-installation-de-connectwise-screenconnect","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/fr\/script-hub\/automatiser-installation-de-connectwise-screenconnect\/","title":{"rendered":"Guide d&rsquo;automatisation de l&rsquo;installation de ConnectWise ScreenConnect sur Linux, \u00e9tape par \u00e9tape"},"content":{"rendered":"<p>Dans le monde informatique actuel, les outils d&rsquo;assistance \u00e0 distance sont indispensables pour les <a href=\"https:\/\/www.ninjaone.com\/fr\/quest-ce-quun-msp\" target=\"_blank\" rel=\"noopener\">fournisseurs de services g\u00e9r\u00e9s (MSP)<\/a> et les professionnels de l&rsquo;informatique. Ces outils facilitent le d\u00e9pannage et la gestion des appareils distants, <a href=\"https:\/\/www.ninjaone.com\/it-hub\/it-service-management\/what-is-network-downtime\/\" target=\"_blank\" rel=\"noopener\">r\u00e9duisant ainsi les temps d&rsquo;arr\u00eat<\/a> et am\u00e9liorant la productivit\u00e9.<\/p>\n<p>ConnectWise ScreenConnect, une solution performante d&rsquo;assistance \u00e0 distance, est largement utilis\u00e9e pour ses fonctionnalit\u00e9s compl\u00e8tes et sa facilit\u00e9 d&rsquo;utilisation. L&rsquo;automatisation du processus d&rsquo;installation de ces outils peut faire gagner beaucoup de temps. Cet article se penche sur un script Bash con\u00e7u pour <strong>t\u00e9l\u00e9charger et installer ConnectWise ScreenConnect sur les syst\u00e8mes Linux<\/strong>, en expliquant ses caract\u00e9ristiques, son utilisation et ses avantages.<\/p>\n<h2>Contexte<\/h2>\n<p>ConnectWise ScreenConnect permet aux professionnels de l&rsquo;informatique d&rsquo;acc\u00e9der \u00e0 distance aux appareils et de les contr\u00f4ler, offrant ainsi une exp\u00e9rience d&rsquo;assistance optimale. L&rsquo;installation de ScreenConnect sur plusieurs appareils peut s&rsquo;av\u00e9rer fastidieuse, en particulier lorsqu&rsquo;une personnalisation est n\u00e9cessaire pour diff\u00e9rents param\u00e8tres organisationnels.<\/p>\n<p>Le script fourni automatise ce processus et permet de personnaliser divers param\u00e8tres tels que le nom de l&rsquo;entreprise, le type d&rsquo;appareil, la localisation, et bien plus. Cette <a href=\"https:\/\/www.ninjaone.com\/fr\/blog\/tout-ce-que-vous-devez-savoir-sur-lautomatisation\" target=\"_blank\" rel=\"noopener\">automatisation<\/a> est particuli\u00e8rement b\u00e9n\u00e9fique pour les entreprises MSP qui g\u00e8rent de nombreux environnements clients, assurant ainsi un d\u00e9ploiement coh\u00e9rent et efficace.<\/p>\n<h2>Le script<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/usr\/bin\/env bash\r\n#\r\n# Description: Download and install ConnectWise ScreenConnect. This script supports automatic customization of the company name, device type, location, and other ScreenConnect fields.\r\n# By using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at https:\/\/www.ninjaone.com\/terms-of-use.\r\n# Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. \r\n# Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. \r\n# Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. \r\n# Warranty Disclaimer: The script is provided \u201cas is\u201d and \u201cas available\u201d, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. \r\n# Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. \r\n# Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. \r\n# EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).\r\n#\r\n# Preset Parameter: --screenconnectdomain \"replace.me\"\r\n#   Replace the text encased in quotes to have the script build the download URL and then install ScreenConnect.\r\n#\r\n# Preset Parameter: --useOrgName\r\n#   Modifies your URL to use the organization name in the \"Company Name\" Field in ScreenConnect.\r\n#\r\n# Preset Parameter: --useLocation\r\n#   Modifies your URL to use the Location Name in the \"Site\" Field in ScreenConnect.\r\n#\r\n# Preset Parameter: --deviceType \"REPLACEME\"\r\n#   Modifies your URL to fill in the \"Device Type\" field in ScreenConnect. (Either Workstation or Laptop).\r\n#\r\n# Preset Parameter: --Department \"REPLACEME\"\r\n#   Modifies your URL to fill in the Department name with the text encased in quotes\r\n#\r\n# Preset Parameter: --skipSleep\r\n#   By default, this script sleeps at a random interval (between 3 and 30 seconds) before downloading the installation file.\r\n#   This option skips the sleep interval.\r\n#\r\n# Pre-set Parameter: --help\r\n#   Displays some help text.\r\n\r\n# These are all our preset parameter defaults. You can set these = to something if you would prefer the script automatically assumed a parameter is used.\r\n_arg_screenconnectdomain=\r\n# For parameters that don't have arguments \"on\" or \"off\" is used.\r\n_arg_useOrgName=\"off\"\r\n_arg_useLocation=\"off\"\r\n_arg_department=\r\n_arg_devicetype=\r\n_arg_destfolder=\/tmp\r\n_arg_skipsleep=\"off\"\r\n_arg_installJava=\"off\"\r\n\r\n# Help text function for when invalid input is encountered\r\nprint_help() {\r\n  printf '\\n\\n%s\\n\\n' 'Usage: [--screenconnectdomain &lt;arg&gt;] [--useOrgName] [--useLocation] [--deviceType &lt;arg&gt;] [--department &lt;arg&gt;] [--skipSleep] [-h|--help]'\r\n  printf '\\n%s\\n' 'Preset Parameter: --screenconnectdomain \"replace.me\"'\r\n  printf '\\t%s' \"Replace the text encased in quotes with the domain used for ConnectWise ScreenConnect. e.g. 'example.screenconnect.com'\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --useOrgName'\r\n  printf '\\t%s\\n' \"Modifies your URL in order to fill in the 'Company Name' field in ScreenConnect with the Organization Name.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --useLocation'\r\n  printf '\\t%s\\n' \"Modifies your URL to fill in the 'Site Name' field in ScreenConnect with the device's location as specified in Ninja.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --department \"YourDesiredDepartmentName\"'\r\n  printf '\\t%s\\n' \"Modifies your URL in order to fill in the 'Department' field in ScreenConnect with the text encased in quotes.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --devicetype \"YourDesiredDeviceType\"'\r\n  printf '\\t%s\\n' \"Modifies your URL in order to fill in the 'Device Type' field in ScreenConnect with the text encased in quotes.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --skipSleep'\r\n  printf '\\t%s\\n' \"By default this script will sleep at a random interval between 3 and 60 seconds prior to download. Use this option to skip this behavior.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --installJava'\r\n  printf '\\t%s\\n' \"Install Java if it's not already present.\"\r\n  printf '\\n%s\\n' 'Preset Parameter: --help'\r\n  printf '\\t%s\\n' \"Displays this help menu.\"\r\n}\r\n\r\n# Determines whether or not help text is necessary and routes the output to stderr\r\ndie() {\r\n  local _ret=\"${2:-1}\"\r\n  echo \"$1\" &gt;&amp;2\r\n  test \"${_PRINT_HELP:-no}\" = yes &amp;&amp; print_help &gt;&amp;2\r\n  exit \"${_ret}\"\r\n}\r\n\r\n# Grabbing the parameters and parsing through them.\r\nparse_commandline() {\r\n  while test $# -gt 0; do\r\n    _key=\"$1\"\r\n    case \"$_key\" in\r\n    --screenconnectdomain | --domain)\r\n      test $# -lt 2 &amp;&amp; die \"Missing value for the optional argument '$_key'.\" 1\r\n      _arg_screenconnectdomain=$2\r\n      shift\r\n      ;;\r\n    --screenconnectdomain=*)\r\n      _arg_screenconnectdomain=\"${_key##--screenconnectdomain=}\"\r\n      ;;\r\n    --useOrgName | --useorgname | --orgname)\r\n      _arg_useOrgName=\"on\"\r\n      ;;\r\n    --useLocation | --useOrgLocation | --uselocation | --location)\r\n      _arg_useLocation=\"on\"\r\n      ;;\r\n    --deviceType | --devicetype)\r\n      test $# -lt 2 &amp;&amp; die \"Missing value for the optional argument '$_key'.\" 1\r\n      _arg_devicetype=\"$2\"\r\n      shift\r\n      ;;\r\n    --devicetype=*)\r\n      _arg_devicetype=\"${_key##--devicetype=}\"\r\n      ;;\r\n    --department | --Department)\r\n      test $# -lt 2 &amp;&amp; die \"Missing value for the optional argument '$_key'.\" 1\r\n      _arg_department=\"$2\"\r\n      shift\r\n      ;;\r\n    --department=*)\r\n      _arg_department=\"${_key##--department=}\"\r\n      ;;\r\n    --installJava)\r\n      _arg_installJava=\"on\"\r\n      ;;\r\n    --skipsleep | --skipSleep)\r\n      _arg_skipsleep=\"on\"\r\n      ;;\r\n    --help | -h)\r\n      _PRINT_HELP=yes die 0\r\n      ;;\r\n    *)\r\n      _PRINT_HELP=yes die \"FATAL ERROR: Got an unexpected argument '$1'\" 1\r\n      ;;\r\n    esac\r\n    shift\r\n  done\r\n}\r\n\r\nparse_commandline \"$@\"\r\n\r\n# If script form is used, override command-line arguments\r\n\r\nif [[ -n $screenconnectDomainName ]]; then\r\n  _arg_screenconnectdomain=\"$screenconnectDomainName\"\r\nfi\r\n\r\nif [[ -n $installJavaIfMissing &amp;&amp; $installJavaIfMissing == \"true\" ]]; then\r\n  _arg_installJava=\"on\"\r\nfi\r\n\r\nif [[ -n $instanceId ]]; then\r\n  _arg_instanceId=\"$instanceId\"\r\nfi\r\n\r\nif [[ -n $useNinjaOrganizationName &amp;&amp; $useNinjaOrganizationName == \"true\" ]]; then\r\n  _arg_useOrgName=\"on\"\r\nfi\r\n\r\nif [[ -n $useNinjaLocationName &amp;&amp; $useNinjaLocationName == \"true\" ]]; then\r\n  _arg_useLocation=\"on\"\r\nfi\r\n\r\nif [[ -n $deviceType ]]; then\r\n  _arg_devicetype=\"$deviceType\"\r\nfi\r\n\r\nif [[ -n $department ]]; then\r\n  _arg_department=\"$department\"\r\nfi\r\n\r\nif [[ -n $skipSleep &amp;&amp; $skipSleep == \"true\" ]]; then\r\n  _arg_skipsleep=\"on\"\r\nfi\r\n\r\n# This function will download our file when we're ready for that.\r\ndownloadFile() {\r\n  i=1\r\n  while [[ $i -lt 4 ]]; do\r\n    if [[ ! $_arg_skipsleep == \"on\" ]]; then\r\n      sleepTime=$((3 + RANDOM % 30))\r\n      echo \"Sleeping for $sleepTime seconds.\"\r\n      sleep $sleepTime\r\n    fi\r\n\r\n    echo \"Download Attempt $i\"\r\n    wget -q -O \"$_arg_destfolder\/$filename\" \"$url\"\r\n\r\n    file=$_arg_destfolder\/$filename\r\n    if [[ -f $file ]]; then\r\n      echo 'Download was successful!'\r\n      i=4\r\n    else\r\n      echo 'Attempt Failed!'\r\n      ((i += 1))\r\n    fi\r\n  done\r\n}\r\n\r\n# Check if deb or rpm distro\r\nusesDeb=$(command -v dpkg)\r\nusesRpm=$(command -v rpm)\r\n\r\nif [[ -z $usesDeb &amp;&amp; -z $usesRpm ]]; then\r\n  _PRINT_HELP=no die \"FATAL ERROR: rpm or dpkg cannot be found. ConnectWise ScreenConnect cannot be installed on this system. https:\/\/screenconnect.connectwise.com\/blog\/remote-support-access\/remote-desktop-linux\" 1\r\nfi\r\n\r\n# If we're not given a download method error out\r\nif [[ -z $_arg_screenconnectdomain ]]; then\r\n  _PRINT_HELP=yes die \"FATAL ERROR: A download url or the domain you use for ScreenConnect is required to install ScreenConnect.\" 1\r\nfi\r\n\r\npattern='^http(.?):\/\/(.*)'\r\nif [[ $_arg_screenconnectdomain =~ $pattern ]]; then\r\n  _arg_screenconnectdomain=${_arg_screenconnectdomain\/\/http*:\\\/\\\/\/}\r\n  echo \"You accidentally included http with the domain. Using '$_arg_screenconnectdomain' instead.\"\r\nfi\r\n\r\n# If the destination folder doesn't exist create it.\r\nif [[ ! -d $_arg_destfolder ]]; then\r\n  mkdir \"$_arg_destfolder\"\r\nfi\r\n\r\n# Setting filename depending on if its a Debian package or a Redhat package.\r\nif [[ -n $usesDeb ]]; then\r\n  filename=\"ClientSetup.deb\"\r\nelse\r\n  filename=\"ClientSetup.rpm\"\r\nfi\r\n\r\n# If a file already exists with that name remove it.\r\nif [[ -f \"$_arg_destfolder\/$filename\" ]]; then\r\n  rm \"$_arg_destfolder\/$filename\"\r\nfi\r\n\r\n# Start the build process\r\necho \"Building URL...\"\r\nusesPython2=$(command -v python2)\r\nusesPython3=$(command -v python3)\r\n\r\nif [[ -z $usesPython2 &amp;&amp; -z $usesPython3 ]]; then\r\n  _PRINT_HELP=no die \"FATAL ERROR: python is required for this script to function!\"\r\nfi\r\n\r\n# For anything we put in the url we'll need to escape it as wget won't do this conversion for us.\r\nencodeURL() {\r\n  local toEncode=$1\r\n  local encodedURL\r\n\r\n  if [[ -n $usesPython3 ]]; then\r\n    encodedURL=$(python3 -c \"import urllib.parse;print(urllib.parse.quote('$toEncode'))\")\r\n  else\r\n    encodedURL=$(python2 -c \"import urllib;print urllib.quote('$toEncode')\")\r\n  fi\r\n  echo \"$encodedURL\"\r\n}\r\n\r\ncompanyName=$(encodeURL \"$NINJA_COMPANY_NAME\")\r\nbaseURL=\"https:\/\/$_arg_screenconnectdomain\/Bin\/$companyName.$filename?e=Access&amp;y=Guest\"\r\n\r\n# If the technician specified --useOrgName (or any other switch\/flag) we set it to \"on\" when we parse the parameters\r\nif [[ $_arg_useOrgName == \"on\" ]]; then\r\n  orgName=$(encodeURL \"$NINJA_ORGANIZATION_NAME\")\r\n  baseURL=\"$baseURL&amp;c=$orgName\"\r\nelse\r\n  # If they decided to not use that field we just leave it blank so ScreenConnect will skip over it.\r\n  baseURL=\"$baseURL&amp;c=\"\r\nfi\r\n\r\nif [[ $_arg_useLocation == \"on\" ]]; then\r\n  location=$(encodeURL \"$NINJA_LOCATION_NAME\")\r\n  baseURL=\"$baseURL&amp;c=$location\"\r\nelse\r\n  baseURL=\"$baseURL&amp;c=\"\r\nfi\r\n\r\nif [[ -n $_arg_department ]]; then\r\n  _arg_department=$(encodeURL \"$_arg_department\")\r\n  baseURL=\"$baseURL&amp;c=$_arg_department\"\r\nelse\r\n  baseURL=\"$baseURL&amp;c=\"\r\nfi\r\n\r\nif [[ -n $_arg_devicetype ]]; then\r\n  _arg_devicetype=$(encodeURL \"$_arg_devicetype\")\r\n  baseURL=\"$baseURL&amp;c=$_arg_devicetype&amp;c=&amp;c=&amp;c=&amp;c=\"\r\nelse\r\n  baseURL=\"$baseURL&amp;c=&amp;c=&amp;c=&amp;c=&amp;c=\"\r\nfi\r\n\r\nurl=\"$baseURL\"\r\necho \"URL Built: $url\"\r\n\r\n# At this point we should have everything setup for us to be able to download the file.\r\ndownloadFile\r\n\r\n# Lets check if the download was a success\r\nfile=\"$_arg_destfolder\/$filename\"\r\nif [[ ! -f $file ]]; then\r\n  _PRINT_HELP=no die \"FATAL ERROR: The Installation File has failed to download please try again.\" 1\r\nfi\r\n\r\n# Grabs a list of all installed packages and then filters it by connectwisecontrol-yourinstanceid\r\nif [[ -n $usesDeb ]]; then\r\n  packageName=$(dpkg --info $file | grep \"Package: \" | sed 's\/Package: \/\/g')\r\n  installedPkg=$(dpkg -l | grep \"$packageName\")\r\nelse\r\n  packageName=$(rpm -qp $file --info | grep \"Name\" | sed 's\/Name *: \/\/g')\r\n  installedPkg=$(rpm -q \"$packageName\" | grep -v \"installed\")\r\nfi\r\n\r\nif [[ -n $installedPkg ]]; then\r\n  echo \"ConnectWise ScreenConnect is already installed!\"\r\n  exit 0\r\nelse\r\n  echo \"ConnectWise ScreenConnect is not installed. Installing...\"\r\nfi\r\n\r\n# Checking for dependencies and if they're not installed install them\r\njavaIsInstalled=$(java -version 2&gt;&amp;1 | grep Runtime)\r\nif [[ -z $javaIsInstalled &amp;&amp; $_arg_installJava == \"on\" ]]; then\r\n  echo \"Java is not installed. Java is required to install ConnectWise ScreenConnect. Attempting to install automatically.\"\r\n  if [[ -n $usesDeb ]]; then\r\n    if apt-get update; then\r\n      echo \"Updated apt package repos successfully. Installing default-jre...\"\r\n      if apt-get install -y default-jre; then\r\n        echo \"Default jre installed successfully!\"\r\n      else\r\n        rm \"$file\"\r\n        _PRINT_HELP=no die \"FATAL ERROR: Failed to install default-jre using apt-get! We recommend fixing this prior to attempting to install ScreenConnect.\" 1\r\n      fi\r\n    else\r\n      rm \"$file\"\r\n      _PRINT_HELP=no die \"FATAL ERROR: Failed to update package repositories using apt-get update! We recommend fixing this prior to attempting to install ScreenConnect.\" 1\r\n    fi\r\n  else\r\n    usesDnf=$(command -v dnf)\r\n    if [[ -n $usesDnf ]]; then\r\n      if dnf install java -y; then\r\n        echo \"Installed latest jre successfully!\"\r\n      else\r\n        rm \"$file\"\r\n        _PRINT_HELP=no die \"FATAL ERROR: Failed to install latest jre using dnf! We recommend fixing this prior to attempting to install ScreenConnect.\" 1\r\n      fi\r\n    else\r\n      if yum install java -y; then\r\n        echo \"Installed latest jre successfully!\"\r\n      else\r\n        rm \"$file\"\r\n        _PRINT_HELP=no die \"FATAL ERROR: Failed to install latest jre using yum! We recommend fixing this prior to attempting to install ScreenConnect.\" 1\r\n      fi\r\n    fi \r\n  fi\r\nelif [[ -z $javaIsInstalled ]]; then\r\n  rm \"$file\"\r\n  _PRINT_HELP=no die \"FATAL ERROR: Please check the box 'Install Java If Missing' in order to have this script install Java as it is required.\"\r\nelse\r\n  echo \"Java is installed!\"\r\nfi\r\n\r\n# Start installing\r\necho \"Installing application...\"\r\nif [[ -n $usesDeb ]]; then\r\n  if dpkg -i \"$file\"; then\r\n    echo \"Exit Code: $?\"\r\n    echo \"ConnectWise ScreenConnect Installed Successfully!\"\r\n    rm \"$file\"\r\n    exit 0\r\n  else\r\n    echo \"Exit Code: $?\"\r\n    rm \"$file\"\r\n    _PRINT_HELP=no die \"FATAL ERROR: The Installation has failed!\" 1\r\n  fi\r\nelse\r\n  if rpm -i \"$file\"; then\r\n    echo \"Exit Code: $?\"\r\n    echo \"ConnectWise ScreenConnect Installed Successfully!\"\r\n    rm \"$file\"\r\n    exit 0\r\n  else\r\n    echo \"Exit Code: $?\"\r\n    rm \"$file\"\r\n    _PRINT_HELP=no die \"FATAL ERROR: The Installation has failed!\" 1\r\n  fi\r\nfi<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><\/div>\n<h2>Description d\u00e9taill\u00e9e<\/h2>\n<p>Le script est structur\u00e9 de mani\u00e8re \u00e0 faciliter le t\u00e9l\u00e9chargement et l&rsquo;installation de ConnectWise ScreenConnect de fa\u00e7on automatis\u00e9e sur les syst\u00e8mes Linux. Voici une description d\u00e9taill\u00e9e de son fonctionnement :<\/p>\n<ul>\n<li><strong>Param\u00e8tres pr\u00e9d\u00e9finis et valeurs par d\u00e9faut :<\/strong> Le script commence par d\u00e9finir les param\u00e8tres pr\u00e9d\u00e9finis et leurs valeurs par d\u00e9faut. Ces param\u00e8tres comprennent le domaine ScreenConnect, le nom de l&rsquo;organisation, le type d&rsquo;appareil, l&#8217;emplacement, etc. Les utilisateurs peuvent modifier ces valeurs par d\u00e9faut en fonction de leurs besoins particuliers.<\/li>\n<li><strong>Fonction de texte d&rsquo;aide :<\/strong> La fonction print_help fournit des conseils sur l&rsquo;utilisation du script, en d\u00e9taillant chaque param\u00e8tre et son utilit\u00e9.<\/li>\n<li><strong>Analyse des param\u00e8tres :<\/strong> La fonction parse_commandline analyse les arguments de la ligne de commande et d\u00e9finit les variables appropri\u00e9es en fonction des donn\u00e9es fournies par l&rsquo;utilisateur.<\/li>\n<li><strong>Fonction de t\u00e9l\u00e9chargement :<\/strong> La fonction downloadFile g\u00e8re le processus de t\u00e9l\u00e9chargement. Il essaie jusqu&rsquo;\u00e0 trois fois, en pr\u00e9voyant un intervalle de pause al\u00e9atoire entre les tentatives afin d&rsquo;att\u00e9nuer les probl\u00e8mes de t\u00e9l\u00e9chargement potentiels.<\/li>\n<li><strong>Logique d&rsquo;installation :<\/strong> Le script v\u00e9rifie la pr\u00e9sence des outils n\u00e9cessaires (dpkg ou rpm), cr\u00e9e l&rsquo;URL de t\u00e9l\u00e9chargement et lance le t\u00e9l\u00e9chargement. Il g\u00e8re \u00e9galement l&rsquo;installation de Java si n\u00e9cessaire.<\/li>\n<\/ul>\n<h2>Cas d&rsquo;utilisation potentiels<\/h2>\n<p>Prenons le cas d&rsquo;un MSP charg\u00e9 de d\u00e9ployer ConnectWise ScreenConnect aupr\u00e8s d&rsquo;une client\u00e8le vari\u00e9e. Ce script simplifie le processus en automatisant le t\u00e9l\u00e9chargement et l&rsquo;installation, en veillant \u00e0 ce que chaque d\u00e9ploiement soit personnalis\u00e9 avec les d\u00e9tails organisationnels corrects. Par exemple, l&rsquo;entreprise MSP peut sp\u00e9cifier diff\u00e9rents types d&rsquo;appareils et d&#8217;emplacements pour chaque client, ce qui simplifie le processus d&rsquo;installation et garantit des d\u00e9ploiements de fa\u00e7on constante.<\/p>\n<h2>Comparaisons<\/h2>\n<p>Par rapport \u00e0 une installation manuelle, ce script r\u00e9duit consid\u00e9rablement le temps et les efforts n\u00e9cessaires. D&rsquo;autres m\u00e9thodes, telles que l&rsquo;utilisation d&rsquo;installateurs graphiques, sont moins efficaces pour les d\u00e9ploiements en masse. Bien que des outils de gestion de la configuration comme Ansible ou Puppet offrent des capacit\u00e9s d&rsquo;automatisation similaires, ce script fournit une solution l\u00e9g\u00e8re et directe sans n\u00e9cessiter d&rsquo;infrastructure suppl\u00e9mentaire.<\/p>\n<h2>FAQ<\/h2>\n<ol>\n<li data-leveltext=\"%1.\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><strong>Que se passe-t-il si le t\u00e9l\u00e9chargement \u00e9choue ?<\/strong> Le script tente de t\u00e9l\u00e9charger jusqu&rsquo;\u00e0 trois fois, en incorporant un intervalle de pause al\u00e9atoire pour \u00e9viter les limites de d\u00e9bit c\u00f4t\u00e9 serveur.<\/li>\n<li data-leveltext=\"%1.\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><strong>Puis-je utiliser ce script sur n&rsquo;importe quelle distribution Linux ?<\/strong> Le script prend en charge les distributions qui utilisent les syst\u00e8mes de gestion de paquets dpkg (bas\u00e9 sur Debian) ou rpm (bas\u00e9 sur Red Hat).<\/li>\n<li data-leveltext=\"%1.\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><strong>Ce script n\u00e9cessite-t-il l&rsquo;utilisation de Java ?<\/strong> Oui, Java est n\u00e9cessaire. Le script peut installer Java automatiquement s&rsquo;il n&rsquo;est pas d\u00e9j\u00e0 pr\u00e9sent.<\/li>\n<\/ol>\n<h2>Implications<\/h2>\n<p>L&rsquo;automatisation de l&rsquo;installation d&rsquo;outils d&rsquo;assistance \u00e0 distance tels que ConnectWise ScreenConnect garantit des d\u00e9ploiements coh\u00e9rents et sans erreur. Ce script permet non seulement de gagner du temps, mais aussi de<a href=\"https:\/\/www.ninjaone.com\/fr\/blog\/decouvrez-si-la-securite-de-vos-equipes-mobiles-est-insuffisante-et-remediez-y\" target=\"_blank\" rel=\"noopener\"> renforcer la s\u00e9curit\u00e9<\/a> en r\u00e9duisant la probabilit\u00e9 d&rsquo;une mauvaise configuration. Dans un contexte plus large, les scripts de d\u00e9ploiement automatis\u00e9 contribuent \u00e0 rendre l&rsquo;environnement informatique plus s\u00fbr et plus facile \u00e0 g\u00e9rer, en particulier dans le cadre d&rsquo;op\u00e9rations \u00e0 grande \u00e9chelle.<\/p>\n<h2>Recommandations<\/h2>\n<p>Lorsque vous utilisez ce script, assurez-vous que :<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\">Les autorisations n\u00e9cessaires sont accord\u00e9es pour l&rsquo;ex\u00e9cution.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\">Le script est test\u00e9 dans un environnement contr\u00f4l\u00e9 avant d&rsquo;\u00eatre d\u00e9ploy\u00e9.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\">Les param\u00e8tres sont soigneusement examin\u00e9s et adapt\u00e9s en fonction des besoins.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Le script fourni est un outil pr\u00e9cieux pour les professionnels de l&rsquo;informatique et les entreprises MSP qui cherchent \u00e0 am\u00e9liorer et simplifier le d\u00e9ploiement de ConnectWise ScreenConnect. En automatisant le processus de t\u00e9l\u00e9chargement et d&rsquo;installation, il permet de gagner du temps et d&rsquo;assurer la coh\u00e9rence entre plusieurs installations. <a href=\"https:\/\/www.ninjaone.com\/fr\/\" target=\"_blank\" rel=\"noopener\">NinjaOne<\/a> propose des solutions compl\u00e8tes de gestion informatique qui compl\u00e8tent ces scripts d&rsquo;automatisation, en fournissant une plateforme performante pour g\u00e9rer efficacement l&rsquo;assistance \u00e0 distance et d&rsquo;autres op\u00e9rations informatiques.<\/p>\n","protected":false},"author":35,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_lmt_disableupdate":"","_lmt_disable":""},"operating_system":[4211],"use_cases":[4282],"class_list":["post-353664","script_hub","type-script_hub","status-publish","hentry","script_hub_category-linux","use_cases-installer-un-logiciel"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/script_hub\/353664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/comments?post=353664"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/media?parent=353664"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/operating_system?post=353664"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/use_cases?post=353664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}