Instalación de PowerShell en Windows - PowerShell | Microsoft Learn

PHOTO EMBED

Mon Aug 12 2024 17:48:11 GMT+0000 (Coordinated Universal Time)

Saved by @angel_leonardo1

# Replace the placeholder information for the following variables:
$ipaddr = '<Nano Server IP address>'
$credential = Get-Credential # <An Administrator account on the system>
$zipfile = 'PowerShell-7.4.4-win-x64.zip'
# Connect to the built-in instance of Windows PowerShell
$session = New-PSSession -ComputerName $ipaddr -Credential $credential
# Copy the file to the Nano Server instance
Copy-Item $zipfile c:\ -ToSession $session
# Enter the interactive remote session
Enter-PSSession $session
# Extract the ZIP file
Expand-Archive -Path C:\PowerShell-7.4.4-win-x64.zip -DestinationPath 'C:\Program Files\PowerShell 7'
content_copyCOPY

https://learn.microsoft.com/es-es/powershell/scripting/install/installing-powershell-on-windows?view