PowerShell Install Program

#||||-- Installer location must be present or changed to where you have installer / exe ---||||||||

#||||||||-- Execute Installer on Remote Machine --||||||


$System_Installedon= Read-Host "Enter System Name"

Invoke-Command $System_Installedon -ScriptBlock {
    

#Test path to Executable
$Install_Checker=Test-Path C:\temp\AcroRdrDC2000920063_en_US.exe
    
   
#Verify Installer Present
    If($Install_Checker){    
        Powershell.exe C:\temp\AcroRdrDC2000920063_en_US.exe /sAll /msi /norestart ALLUSERS=1 EULA_ACCEPT=YES    
        Write-Output "Process Completed"
    }Else{
        Write-Output "Executable Not Found"
    }    
}

2020 | Scott W. Head  |  Sr. Systems Admin | Certified Microsoft Windows Server Administrator