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
# Establecer la codificación de salida a UTF-8 para evitar problemas con caracteres especiales | |
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false) | |
# Función para mostrar la información del sistema | |
function Show-SystemInfo { | |
Write-Host "`n--- Recopilando información del sistema ---`n" -ForegroundColor Green | |
# Información del sistema | |
try { | |
$ComputerInfo = Get-CimInstance -ClassName Win32_ComputerSystem |
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
# Establece codificación UTF-8 para soportar tildes y caracteres especiales | |
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false) | |
Write-Host "`n--- Recopilando información del sistema ---`n" -ForegroundColor Green | |
# 1. Información del sistema | |
try { | |
$ComputerInfo = Get-CimInstance -ClassName Win32_ComputerSystem | |
$PCName = $ComputerInfo.Name | |
} catch { |