informatica:soporte_instalacion:sistemas_operativos:windows:powershell
Diferencias
Muestra las diferencias entre dos versiones de la página.
| informatica:soporte_instalacion:sistemas_operativos:windows:powershell [2025/09/13 09:51] – creado admin | informatica:soporte_instalacion:sistemas_operativos:windows:powershell [2025/09/29 04:23] (actual) – 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:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
informatica/soporte_instalacion/sistemas_operativos/windows/powershell.1757757101.txt.gz · Última modificación: 2025/09/13 09:51 por admin
