This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.

$DownloadURL = ""
$Assemblies= @(
        "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll",
        "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#Check if all assemblies given in the list are found
$FileExist = $True
ForEach ($File in $Assemblies)
    #Check if CSOM Assemblies are Found
    If(!(Test-Path $File))
        $FileExist = $False; Break;
#Download and Install CSOM Assemblies
    #Download the SharePoint Online Client SDK
    Write-host "Downloading SharePoint Online Client SDK..." -f Yellow -NoNewline
    $InstallerPath = "$Env:TEMP\SharePointOnlineClientComponents16.msi"
    Invoke-WebRequest $DownloadURL -OutFile $InstallerPath
    Write-host "Done!" -f Green
    #Start Installation
    Write-host "Installing SharePoint Online Client SDK..." -f Yellow -NoNewline
    Start-Process MSIExec.exe -ArgumentList "/i $InstallerPath /qb" -Wait
    Write-host "Done!" -f Green
    Write-host "SharePoint Online CSOM assemblies are already installed!" -f Yellow

#Read more:


Download and Install SharePoint Online Client Components SDK using PowerShell