Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

I'm falling in love with PowerShell.  The more I use it, the more I see the power of this simple but very effective scripting language for controlling the OS.

Before you try to execute your scripts, open the PowerShell as administrator, then run the command

Code Block
languagepowershell
Set-ExecutionPolicy RemoteSigned

Powershell command to install Chrome

Code Block
languagepowershell
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)