Created
December 3, 2024 07:05
-
-
Save aman-gautam/068c76234c71550f978ab895efc1667c to your computer and use it in GitHub Desktop.
Windows Server -- install chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update system | |
Write-Output "Updating system..." | |
Install-PackageProvider -Name NuGet -Force | |
Install-Module -Name PSWindowsUpdate -Force | |
Import-Module PSWindowsUpdate | |
Get-WindowsUpdate -Install -AcceptAll -IgnoreReboot | |
# Install Chrome | |
Write-Output "Installing Google Chrome..." | |
$chromeInstaller = "https://dl.google.com/chrome/install/latest/chrome_installer.exe" | |
$chromePath = "$env:USERPROFILE\Downloads\chrome_installer.exe" | |
Invoke-WebRequest -Uri $chromeInstaller -OutFile $chromePath | |
Start-Process -FilePath $chromePath -ArgumentList "/silent /install" -Wait | |
# Install Python | |
Write-Output "Installing Python..." | |
$pythonInstaller = "https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe" # Update version as needed | |
$pythonPath = "$env:USERPROFILE\Downloads\python_installer.exe" | |
Invoke-WebRequest -Uri $pythonInstaller -OutFile $pythonPath | |
Start-Process -FilePath $pythonPath -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1" -Wait | |
# Install Python packages | |
Write-Output "Installing Python packages..." | |
$pythonExe = "C:\Python311\python.exe" # Update path if Python version changes | |
& $pythonExe -m pip install --upgrade pip | |
& $pythonExe -m pip install requests pandas flask | |
Write-Output "Setup completed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment