Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть PowerShell - SSH From windows

  • Mr Automation
  • 2022-02-03
  • 1112
PowerShell - SSH From windows
automationpowershelllearn automationhow to automatesaltstackwindows automationlinux automationunix automationsalt automationpowershell automationMr AutomationIT Generalistconfiguration as codeinfrastucture as codeIaCorchestration
  • ok logo

Скачать PowerShell - SSH From windows бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно PowerShell - SSH From windows или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку PowerShell - SSH From windows бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео PowerShell - SSH From windows

(How to run a command on Linux/Unix/network device via ssh from windows)

In this video I demonstrate how you can connect to a SSH based device from a windows box and execute command remotely on them.
The script is very simple, though quite powerful.
I added the use of a simple input file in csv format, so you can run it against multiple systems if you like.

*powershell
*learn powershell
*automation
*learn automation
*state.show_sls
*windows
*linux
*windows powershell

Code :

#$PSVersionTable
#find-module posh-ssh
#install-module Posh-SSH
#get-module Posh-SSH #| select ExportedCommands
$p = "MyPass01"
$secpass = $p | ConvertTo-SecureString -AsPlainText -Force
$clientCreds = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList "root", $secpass
$SSHsession = New-SSHSession -ComputerName l01.home.local -acceptkey -credential $clientCreds -ConnectionTimeout 30
$o = Invoke-SSHCommand -SSHSession $SSHsession -Command "ls /"
$o
$o.Output #this is the output property you get back
Remove-SSHSession -SSHSession $SSHsession | Out-Null

foreach($item in import-csv .\input.csv){
Write-Warning "starting with $($item.hostname)"
$secpass = $item.password | ConvertTo-SecureString -AsPlainText -Force
$clientCreds = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList $item.username, $secpass
$SSHsession = New-SSHSession -ComputerName $item.hostname -acceptkey -credential $clientCreds -ConnectionTimeout 30
$o = Invoke-SSHCommand -SSHSession $SSHsession -Command "$($item.commandtorun)"
$o.Output #this is the output property you get back
Start-Sleep -Seconds 3
Remove-SSHSession -SSHSession $SSHsession | Out-Null
}

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]