I'm aiming to run the script for Google Chrome installation on a remote computer. The script for local installation has been saved on my PC (\localhost\c$\Chrome\Chrome Installer.ps1").
I was thinking to copy the script first to the remote machine and then run the script remotely. Could you please suggest the best way to run that script remotely? Thank you in advance
Best Regards, Stan
You can find the script below:
$Installer = "$env:temp\chrome_installer.exe"
$url = 'http://dl.google.com/chrome/install/375.126/chrome_installer.exe'
Invoke-WebRequest -Uri $url -OutFile $Installer -UseBasicParsing
Start-Process -FilePath $Installer -Args '/silent /install' -Wait
Remove-Item -Path $Installer
$login = Read-Host "Please enter login id"
$comp = Read-Host "Please enter computer name or IPV4 adress"
Copy-Item -Path "\\localhost\c$\Chrome\Chrome Installer.ps1" -Dest "\\$($comp)\c$\temp"