-1

We have an application installed on a client machine which needs to be updated every 14-21 days. I'm looking for a way to run C:\Program Files (x86)\ProgamName\Update\UpdateClient.exe on the client computer without having to give the user admin credentials.

  • Can this be done using SCCM?
  • Powershell script?

Currently (temporarily) we have a domain user account that stays disabled until the update period and then we enable to account to be used. We do not want to use this method much longer.

n1ch0las
  • 1
  • 2
  • For what it's worth, this can absolutely also be done via SCCM (it is basically the main point of SCCM I would argue) but it depends very much on your environment if SCCM is a good idea. I'd say you need a few hundred if not thousand PCs for SCCM to really shine. In a smaller environment the advantages will not outweigh the work you'll have to put in. There should also be solutions that fit in between using a script (which I would say is ok for small numbers of computers but begins to be problematic if you have 20-100 and SCCM which is nice for 1000+.) – Syberdoor Jul 02 '20 at 07:16

1 Answers1

0

I think you can do it with powershell + psexec as well. Here is some example:

Clear-Host
$programToRun = 'C:\Program Files (x86)\ProgamName\Update\UpdateClient.exe'
$computers = Get-Content "C:\computers.txt"
foreach ($computername in $computers) {
    if (Test-Connection $computername -Quiet) {
        Write-Host "Updating $computername"
        #USING PSEXEC
        cmd /s /c "C:\PsTools\psexec.exe \\$computername $programToRun"
        Start-Sleep -s 10
    } else {
            Write-Host "$computername is offline"
    }
}
Alex R.
  • 467
  • 3
  • 14