Install Action1 Agent (Community)

# Define the directory path
$directoryPath = "C:\your MSP directory here"

# Create the directory if it doesn't exist
if (-not (Test-Path $directoryPath -PathType Container)) {
    New-Item -Path $directoryPath -ItemType Directory -Force
    Write-Output "Directory 'your MSP directory here' created on C drive."
}

# Define the URL of the file to download
$url = "Action1 Agent Download URL here"

# Define the path where you want to save the downloaded file
$outputPath = Join-Path -Path $directoryPath -ChildPath "agent(My_Organization).msi"

# Download the file from the specified URL
Invoke-WebRequest -Uri $url -OutFile $outputPath

# Install the downloaded MSI file
Start-Process -FilePath $outputPath -ArgumentList "/qn" -Wait

Write-Output "Installation complete."

Script data

Language - PowerShell

Run as - System / Root User

Script timeout duration - 5 Mins

Read me

Replace your MSP directory here in lines 2 and 7 with the directory on C you either use for storing files or let it create a new directory. Leave all quotation marks around those customizations. In Line 11 you'll insert your Action1 agent download URL. Also check the end of the download URL. In Line 14, between the -ChildPath "/agent and .msi will be something custom to your organization. Make sure you enter that on line 14 replacing (my_Organization) to match whatever fits your custom URL.