Nevets82 / Posh-Ubnt

This PowerShell module provides some functionality to facilitate automating backup actions of a Ubnt device over SSH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Posh-Ubnt PowerShell Ubnt Module

This PowerShell module provides some functionality to facilitate automating backup actions of a Ubnt device over SSH.

Similar Projects

Here are some similar projects I am working on:

Dependencies

This module depends on the following PowerShell modules:

Inspect

PS> Save-Module -Name Posh-Ubnt -Path <path>

Install

PS> Install-Module -Name Posh-Ubnt

Functionality

  • Backup-UbntRunningConfig: Gets the running configuration and writes it to a file.
  • Backup-UbntSystemConfig: Gets the system (startup) configuration and writes it to a file.
  • Get-UbntRunningConfig: Gets the running configuration.
  • Get-UbntSystemConfig: Gets the system (startup) configuration.

Usage

Backup Running Configuration

This PowerShell command gets the running configuration and writes it to a file.

PS> Backup-UbntRunningConfig -HostAddress "192.168.1.20" -HostPort 22 -Credential (Get-Credential) -FilePath "$([Environment]::GetFolderPath(MyDocuments))\running-config.txt"

Advanced Options:

  • Specify the -AcceptKey flag to automatically accept SSH key.

Backup System Configuration

This PowerShell command gets the sytem (startup) configuration and writes it to a file.

PS> Backup-UbntSystemConfig -HostAddress "192.168.1.20" -HostPort 22 -Credential (Get-Credential) -FilePath "$([Environment]::GetFolderPath(MyDocuments))\system-config.txt"

Advanced Options:

  • Specify the -AcceptKey flag to automatically accept SSH key.

Get Running Configuration

This PowerShell command gets the running configuration.

PS> Get-UbntRunningConfig -HostAddress "192.168.1.20" -HostPort 22 -Credential (Get-Credential)

Advanced Options:

  • Specify the -AcceptKey flag to automatically accept SSH key.

Get System Configuration

This PowerShell command gets the system (startup) configuration.

PS> Get-UbntSystemConfig -HostAddress "192.168.1.20" -HostPort 22 -Credential (Get-Credential) 

Advanced Options:

  • Specify the -AcceptKey flag to automatically accept SSH key.

Get Log Messages

This PowerShell command gets the log messages.

PS> Get-UbntLogMessages -HostAddress "192.168.1.20" -HostPort 22 -Credential (Get-Credential) 

Advanced Options:

  • Specify the -AcceptKey flag to automatically accept SSH key.

Compatibility

These PowerShell functions were tested on the following Ubnt devices:

  • TOUGHSwitch TS-5-PoE (SW version: 1.3.2)
  • TOUGHSwitch TS-8-PRO (SW version: 1.3.2)

Change Log

Version 1.0.0

New Features

  • Added documentation
  • Added support to backup running config (Backup-UbntRunningConfig)
  • Added support to backup system config (Backup-UbntSystemConfig)
  • Added support to get running config (Get-UbntRunningConfig)
  • Added support to get system config (Get-UbntSystemConfig)
  • Added support to get log messages (Get-UbntLogMessages)

Todo

  • Test on more devices
  • ...

About

This PowerShell module provides some functionality to facilitate automating backup actions of a Ubnt device over SSH.

License:GNU General Public License v3.0


Languages

Language:PowerShell 100.0%