This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Install Sophos Endpoint Software with Powershell

Install Sophos Endpoint Software with Powershell on Windows 7-10 Platforms. 

 

I need to deploy it using MobileIron



This thread was automatically locked due to age.
  • Hello Nightwing2099,

    assuming you are talking about the on-premise SESC. Basically you could run setup.exe with the appropriate switches from the CID. Please note that setup.exe performs some initialization and then installs AutoUpdate which subsequently carries out the actual installation.
    If you can't access the CID via UNC an alternative method is to create a self-extracting package with the Deployment Packager.

    Christian

  • Do you have any examples in Powershell

  • Hello Nightwing2099,

    I'm afraid, no, as I assume that MobileIron does more than just run a script that calls a command.

    Christian

  • Here is a PowerShell script I wrote for installing Intercept X through our central deployment tool (not Sophos Central Dashboard) But it should work locally as well if you want to install on an individual machine

    For "$source = "Insert your Endpoint link from Sopho central dashboard for the client - right-click to get link location and copy"

    It should be an Amazon WebServices link and it is unique for your client as it has config embedded that links to your central dashboard.

     

    #######Script Starts#########

    # Silent Install Sophos AV Client

    # Script by Alan O'Brien 2020


    # Path for the workdir
    $workdir = "c:\temp\"

    $sixtyFourBit = Test-Path -Path "C:\Program Files"

    $SophosInstalled = Test-Path -Path "C:\Program Files\Sophos"

    If ($SophosInstalled){
    Write-Host "Sophos Already Installed!"
    } ELSE {
    Write-Host "Begining the installation"

    # Check if work directory exists if not create it

    If (Test-Path -Path $workdir -PathType Container){
    Write-Host "$workdir already exists" -ForegroundColor Red
    } ELSE {
    New-Item -Path $workdir -ItemType directory
    }

    # Download the installer

    $source = "Insert your Endpoint link from Sopho central dashboard for the client - right-click to get link location and copy"
    $destination = "$workdir\SophosSetup.exe"

    # Check if Invoke-Webrequest exists otherwise execute WebClient

    if (Get-Command 'Invoke-Webrequest'){
    Invoke-WebRequest $source -OutFile $destination
    } else {
    $WebClient = New-Object System.Net.WebClient
    $webclient.DownloadFile($source, $destination)
    }

    # Start the installation
    Start-Process -FilePath "$workdir\SophosSetup.exe" -ArgumentList "--quiet"

    Start-Sleep -s 35

    Start-Process -FilePath "C:\Program Files\Sophos\Sophos UI\Sophos UI.exe" -ArgumentList "/AUTO"
    }

    #######Script Ends#########