> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/getting-started.md).

# Instalación

## Instalación MSI (Windows)

La instalación MSI crea un servicio de PowerShell Universal. De forma predeterminada, PowerShell Universal escucha en el puerto 5000. Puede navegar a `http://localhost:5000`

Las descargas MSI están disponibles en nuestra [página de descargas](https://devolutions.net/download-center/powershell-universal/).

Las instalaciones de sistema se ejecutan como un servicio de Windows. Las instalaciones de usuario se ejecutan cuando el usuario inicia sesión en la máquina. La instalación de usuario se ejecuta en el contexto del usuario.

### Parámetros MSI

La siguiente tabla contiene los parámetros que puede especificar si ejecuta `msiexec` sobre nuestra instalación MSI con fines de automatización:

| Parámetro              | Descripción                                                                                                                                                   | Valor predeterminado                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| INSTALLFOLDER          | La carpeta de instalación de PowerShell Universal                                                                                                             | %ProgramFiles(x86)%\Universal                             |
| TCPPORT                | El puerto TCP en el que escuchará el servidor HTTP.                                                                                                           | 5000                                                      |
| REPOFOLDER             | La carpeta del repositorio donde guardar los ficheros de configuración.                                                                                       | %ProgramData%\UniversalAutomation\Repository              |
| CONNECTIONSTRING       | La cadena de conexión de SQL, SQLite o PostgreSQL.                                                                                                            | Data Source=%ProgramData%\UniversalAutomation\database.db |
| DATABASETYPE           | SQL, SQLite o PostgreSQL                                                                                                                                      | SQLite                                                    |
| STARTSERVICE           | Si se debe iniciar el servicio después de la instalación (0 o 1)                                                                                              | 1                                                         |
| SERVICEACCOUNT         | La cuenta de servicio que se establecerá para el servicio de Windows. Use el formato dominio\nombredeusuario.                                                 | Ninguno                                                   |
| SERVICEACCOUNTPASSWORD | La contraseña de la cuenta de servicio que se establecerá para el servicio de Windows. La contraseña se enmascarará con \*\*\* en el registro del instalador. | Ninguno                                                   |
| TELEMETRY              | Recopilación anónima de telemetría                                                                                                                            | 0                                                         |
| ADDPSMODULEPATH        | Añade el directorio del módulo de PowerShell Universal a la variable de entorno PSModulePath.                                                                 | 1                                                         |
| STARTSERVICE           | Si se debe iniciar el servicio después de la instalación.                                                                                                     | 1                                                         |
| INSTALLTYPE            | Si se debe realizar una instalación de servidor o de usuario.                                                                                                 | Servidor                                                  |

### Ejemplo

El ejemplo siguiente muestra cómo ejecutar `msiexec.exe` para instalar PowerShell Universal y proporcionar parámetros al instalador:

{% code overflow="wrap" %}

```powershell
 Start-Process msiexec.exe -ArgumentList "/I C:\Users\adamr\Downloads\PowerShellUniversal.5.5.2.msi /q /norestart /L*V `"C:\users\adamr\desktop\msi.log.txt`" STARTSERVICE=0 SERVICEACCOUNT=contoso\service_account SERVICEACCOUNTPASSWORD=ThisPasswordWillBeReplacedWithAsterisksInTheMSILogs" -Wait -NoNewWindow
```

{% endcode %}

## Instalación ZIP

También puede descargar el ZIP desde nuestra [página de descargas](https://devolutions.net/download-center/powershell-universal/) si desea desplegar los ficheros con xcopy en Windows o Linux.

### Windows

Puede iniciar Universal descomprimiendo el contenido, desbloqueando los ficheros y ejecutando después `Universal.Server.exe`.

```powershell
Expand-Archive -Path .\Universal.zip -DestinationPath .\Universal
Get-ChildItem .\Universal -Recurse | Unblock-File
Start-Process .\Universal\Universal.Server.exe
```

### Linux

Puede usar la siguiente línea de comandos en Linux para instalar e iniciar PowerShell Universal:

```bash
 wget -O psu.zip https://powershelluniversal.com/download/psu/linux-x64/latest
 sudo apt install unzip 
 unzip psu.zip -d PSU
 chmod +x ./PSU/Universal.Server
 ./PSU/Universal.Server
```

## Servicio de Linux

Puede usar `systemd` para iniciar PowerShell Universal como un servicio. El script siguiente es un ejemplo de descarga de una versión de PowerShell Universal e instalación como servicio:

```bash
# ----
# This script will install PowerShell Universal on Linux as a service
# This has been tested on Ubuntu 20.04 (ARM64) on a Raspberry Pi 4
# ----
# Dependencies:
# wget
# unzip
#
# Make sure they are installed
# ----

# These are used to derive the download URL
PSU_VERSION="5.5.2" # Change this to the current version
PSU_ARCH="arm64" # Change this to your desired architecture
PSU_FILE="Universal.linux-${PSU_ARCH}.${PSU_VERSION}.zip"
PSU_URL="https://imsreleases.blob.core.windows.net/universal/production/${PSU_VERSION}/${PSU_FILE}"

# These are used for installing PowerShell Universal
# If you'd like to use a different path, change this
PSU_PATH="/opt/psuniversal"
PSU_EXEC="${PSU_PATH}/Universal.Server"

# These are for installing it as a service
PSU_SERVICE="psuniversal"
PSU_USER="psuniversal"

# ----
# BEGIN
# ----

echo "Creating $PSU_PATH and granting access to $USER"
sudo mkdir $PSU_PATH
sudo setfacl -m "u:${USER}:rwx" $PSU_PATH

echo "Creating user $PSU_USER and making it the owner of $PSU_PATH"
sudo useradd $PSU_USER -m
sudo chown $PSU_USER -R $PSU_PATH

echo "Downloading PowerShell Universal $PSU_VERSION ($PSU_ARCH)"
wget -q $PSU_URL -O $PSU_FILE

echo "Extracting $PSU_FILE to $PSU_PATH"
unzip -o -qq $PSU_FILE -d $PSU_PATH

echo "Make $PSU_EXEC executable"
sudo chmod +x $PSU_EXEC

echo "Creating service configuration"
cat <<EOF > ~/$PSU_SERVICE.service
[Unit]
Description=PowerShell Universal
[Service]
ExecStart=$PSU_EXEC
SyslogIdentifier=psuniversal
User=$PSU_USER
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF

echo "Creating and starting service"
sudo cp -f ~/$PSU_SERVICE.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable $PSU_SERVICE
sudo systemctl start $PSU_SERVICE
sudo systemctl status $PSU_SERVICE --no-pager

# If you don't use UFW, you can comment this out
echo "Allow port 5000/tcp"
sudo ufw allow 5000/tcp

# ----
# END
# ----
```

## Módulo de PowerShell

Puede usar el módulo de PowerShell de PowerShell Universal para instalar el servidor Universal. Para instalar el módulo, use `Install-Module`.

```powershell
Install-Module Devolutions.PowerShellUniversal
```

Para instalar el servidor Universal, puede usar `Install-PSUServer`.

```powershell
Install-PSUServer -LatestVersion
```

Al ejecutar este comando en Windows se crea e inicia un servicio de Windows en su máquina. Al ejecutar este comando en Linux se crea e inicia un servicio systemd en su máquina. Al ejecutar este comando en Mac OS se descarga y extrae el servidor PowerShell Universal.

## Docker

Consulte la [página de Docker](/powershell-universal/es/getting-started/docker.md#installation).

## Instalación en IIS

Visite la [documentación de alojamiento en IIS](/powershell-universal/es/config/hosting/hosting-iis.md) para obtener información sobre cómo configurar PowerShell Universal como un sitio web de IIS.

## Configuración del antivirus

PowerShell Universal aprovecha al máximo PowerShell y el SDK de PowerShell. Incluye scripts de PowerShell directamente en el producto. Considere configurar el antivirus para permitir la ejecución de scripts de PowerShell en PowerShell Universal.

### Directorios

Los siguientes directorios contienen ejemplos, de un sistema Windows estándar, de scripts y ficheros ejecutables que quizá deba excluir de las comprobaciones del antivirus. Cambiar las rutas en appsettings.json o en el instalador requiere cambiar qué directorios se excluyen.

| Ruta                              | Descripción                                                                                                                      |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| %ProgramData%\PowerShellUniversal | Contiene ficheros de registro y appsettings.json                                                                                 |
| %ProgramData%\UniversalAutomation | Contiene scripts de PowerShell y artefactos. Contiene la base de datos de fichero único cuando no se usa la integración con SQL. |
| %ProgramFiles(x86)\Universal      | Contiene los ejecutables, bibliotecas y módulos de la aplicación PowerShell Universal.                                           |

### Ejecutables

Puede ser necesario excluir determinados ejecutables que ejecutan scripts de PowerShell. A continuación se muestra una lista de los ejecutables que ejecutan PowerShell desde PowerShell Universal.

| Nombre                       | Descripción                                             |
| ---------------------------- | ------------------------------------------------------- |
| Universal.Server.exe         | El servicio principal de PowerShell Universal.          |
| PowerShellUniversal.Host.exe | El ejecutable del entorno host de PowerShell Universal. |
| pwsh.exe                     | PowerShell 7.x                                          |
| PowerShell.exe               | PowerShell 5.x                                          |

## Nombre y contraseña de administrador predeterminados

Puede usar las variables de entorno `$ENV:PSUDefaultAdminName` y `$ENV:PSUDefaultAdminPassword` para cambiar este comportamiento. Estos valores solo se usan si no existe ya una cuenta de administrador. Esto resulta útil para instalaciones basadas en la nube.

## Agente

El agente de PowerShell Universal ejecuta acciones de Event Hub. Instálelo según su entorno:

### Windows (MSI)

El MSI del agente de PowerShell Universal está en nuestra página de descargas. Tras instalar el MSI, un servicio del agente de PowerShell Universal se ejecuta en su máquina. [Configúrelo](/powershell-universal/es/api/event-hubs.md) para conectarse a PowerShell Universal.

### ZIP

Los ficheros ZIP para cada plataforma que admitimos están en nuestra página de descargas. Cada ZIP contiene un fichero `PSUAgent.exe` o `PSUAgent` que puede iniciar un agente. Ejecute el proceso como un servicio para que se inicie cada vez que la máquina se reinicie.

### Docker

La imagen de contenedor `devolutions/powershell-universal-agent:latest` proporciona el agente de PowerShell Universal como un contenedor docker de Linux.

```
docker pull devolutions/powershell-universal-agent:latest
```

## Próximos pasos

En este punto, Universal está en funcionamiento. Visite `http://localhost:5000` o su puerto predeterminado para navegar a la consola de administración. Inicie sesión con el nombre y la contraseña de administrador predeterminados o cree una cuenta de administrador predeterminada.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/getting-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
