informatica:soporte_instalacion:sistemas_operativos:windows:powershell
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Próxima revisión | Revisión previa | ||
| informatica:soporte_instalacion:sistemas_operativos:windows:powershell [2025/09/13 09:51] – creado admin | informatica:soporte_instalacion:sistemas_operativos:windows:powershell [2026/06/06 07:11] (actual) – [Desorden] admin | ||
|---|---|---|---|
| Línea 6: | Línea 6: | ||
| ssh < | ssh < | ||
| </ | </ | ||
| + | |||
| + | ===== Desorden ===== | ||
| + | |||
| + | Para activar Powershell en pc remota | ||
| + | < | ||
| + | Enable-PSRemoting | ||
| + | </ | ||
| + | [[https:// | ||
| + | |||
| + | < | ||
| + | |||
| + | # Ver servicios: | ||
| + | |||
| + | get-service | ||
| + | |||
| + | # guadar en una variable las credenciales: | ||
| + | |||
| + | $cred = get-Credential -credential admin@dom | ||
| + | |||
| + | #usar credencial y consultar servicios en otra máquina: | ||
| + | |||
| + | Get-WMIObject Win32_Service -computer MAQUINAREMOTA -credential $cred | ||
| + | |||
| + | # esto me dio error, pero si lo guardo en una variable funciona: | ||
| + | |||
| + | $service = Get-Service -ComputerName MAQUINAREMOTA | ||
| + | $service | ||
| + | |||
| + | # Reiniciar PC, no funciono: | ||
| + | |||
| + | Restart-Computer -ComputerName MAQUINAREMOTA | ||
| + | |||
| + | # Cargar a variable unos servicios | ||
| + | |||
| + | $service = Get-Service -ComputerName MAQUINAREMOTA -Name " | ||
| + | $service #para mostarlo en pantalla | ||
| + | |||
| + | #Ahora de ese VNC quiero ver sus metodos: | ||
| + | |||
| + | $service | Get-Member -Type Method | ||
| + | |||
| + | # me mostrará lo metoods que tinee ese servicio, iniciar, stop, ojo iniciar VNC requiere unos parametros. | ||
| + | |||
| + | $service.Stop() #Ojo cuidado que apaga el servicio pero para iniciarlo es dificil por los parametros | ||
| + | |||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | Comandos para reiniciar PC: | ||
| + | |||
| + | por CMD, el s lo apaga el /r lo reinicia (el shutdown -a aborta el reinicio o apagado) | ||
| + | |||
| + | < | ||
| + | |||
| + | shutdown /r /m \\[MI PC REMOTO] /t 60 /c “Por favor, finalice sus tareas” | ||
| + | |||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | Con PowerShell: | ||
| + | < | ||
| + | Restart-Computer –ComputerName “NAME_OF_SYSTEM” | ||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Conexion remota: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | ===== Ejecución scripts ===== | ||
| + | * [[https:// | ||
| + | |||
| + | En el terminal de Visual Studio Code a veces ocurre que no puede ejecutar scripts | ||
| + | < | ||
| + | npm : No se puede cargar el archivo C:\Program Files\nodejs\npm.ps1 porque la ejecución de scripts está deshabilitada en este sistema. Para obtener más información, | ||
| + | el tema about_Execution_Policies en https:/ | ||
| + | En línea: 1 Carácter: 1 | ||
| + | + npm install -g typescript | ||
| + | + ~~~ | ||
| + | + CategoryInfo | ||
| + | + FullyQualifiedErrorId : UnauthorizedAccess | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
informatica/soporte_instalacion/sistemas_operativos/windows/powershell.1757757101.txt.gz · Última modificación: 2025/09/13 09:51 por admin
