If you some reason you want to download and install Python 3.x.x using PowerShell, then you can write your own script as follows.
Script to download Python using PowerShell
# Step 1: get the download link of Python version 3.x.x from the internet
$pythonInstallerUrl = "https://www.python.org/ftp/python/3.9.8/python-3.9.8.exe"
# Step 2: set the PATH where the Python installer will be downloaded.
$pythonSetup = "D:\setup\python-3.9.8.exe"
# Step 3: Download the Pyhton 3.x.x setup file.
Invoke-WebRequest -Uri $pythonInstallerUrl -OutFile $pythonSetup
# Step 4: Install Python with default settings.
Start-Process -Wait -FilePath $pythonSetup -ArgumentList "/quiet", "PrependPath=1"
# Step 5: Remove the setup file (Optional)
Remove-Item -Path $pythonSetup

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Powershell,
- PowerShell: How to Check if a Module is Already Installed
- PowerShell: How to Write Output to a File
- PowerShell: Steps to Connect to connect to Exchange Online
- PowerShell Fix: Get-Help cannot find the Help files for this cmdlet on this computer
- PowerShell Traditional For Loop Example
- How to Run PowerShell Script as Administrator (Elevate)
- Update Powershell Using Command Line
- How to delete a file using PowerShell [Windows/macOS]
- PowerShell: Grep Command Alternative - Select-String
- PowerShell Concatenate String Examples
- How to add Sleep to PowerShell Script
- Connect Azure AD (Active Directory) for PowerShell
- How to Open PowerShell on Mac?
- List of PowerShell Function Commands for Mac
- How to Connect to Azure AD Account using PowerShell on Mac
- Download Google Chrome setup exe file using PowerShell
- Set Environment Variable in PowerShell for Mac
- How to switch to Powershell on Mac Terminal
- How to add sleep in Powershell Script
- PowerShell on Mac: The term get-service is not recognized as a name of a cmdlet, function, script file, or executable program
- How to Identify installed PowerShell version
- How to check PowerShell version
- How to install PowerShell on Mac using Brew
- PowerShell Switch Statement with Examples
- PowerShell ISE Alternative for Mac
More Posts:
- MySQL #6 - Error on delete of './my-database/db.opt' (Errcode: 13 - Permission denied) - MySQL
- How to enable Auto-Save Files in VS Code - HowTos
- [Fix] Connect to Minecraft Remote Connect URL via https //aka.ms/remoteconnect - Microsoft
- Android Toast position top - Android
- How to start/boot macOS in safe mode - Big Sur 11.0, Catalina 10.15, or Mojave 10.14 - MacOS
- Java: Reference List of Time Zones and GMT/UTC Offset - Java
- How to change the System Settings Sidebar icon size Mac Ventura 13 - MacOS
- Word-wrap Eclipse Console logs - Eclipse