Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
UseCases Update Jan 14, 2019
docs Update Jan 14, 2019
en-US License link changed to the GitHub Wiki Jan 15, 2019
.README.md Final update to UniFiTooling here. Jan 12, 2019
Acknowledgements.md Test the automated Build Process Jan 14, 2019
CHANGELOG.md Update Jan 14, 2019
CODE_OF_CONDUCT.md Test the automated Build Process Jan 14, 2019
CONTRIBUTING.md License link changed to the GitHub Wiki Jan 15, 2019
LICENSE Update Jan 14, 2019
License.md Update Jan 14, 2019
README.md License link changed to the GitHub Wiki Jan 15, 2019
UniFiTooling.psd1 Update Jan 14, 2019
UniFiTooling.psm1 Update Jan 14, 2019

README.md

UniFiTooling

This is an early beta version for an PowerShell Module for the Ubiquiti UniFi Controller API.

I use this module for many automated updates for my UniFi Security Gateway Firewall Rules and do a few other things automated.

Use Cases

Please see the UseCases directory.

Version

This document is based on UniFiTooling version 1.0.8 (Development)

Requirements

PowerShell 5.0, or later. Desktop or Core.

Installation

Install the module with PowerShellGet directly from the Powershell Gallery, Preferred method!

Powershell Gallery Powershell Gallery

With PowerShellGet

# Install the module for the Current User with PowerShellGet directly from the Powershell Gallery, Preferred method
# Run in a regular or administrative PowerShell prompt (Elevated).
PS C:\> Install-Module -Name 'UniFiTooling' -Scope CurrentUser

# Install the module for the All Users with PowerShellGet directly from the Powershell Gallery, Preferred method.
# Run this in an administrative PowerShell prompt (Elevated).
PS C:\> Install-Module -Name 'UniFiTooling' -Scope AllUsers

Manual Installation (unsupported)

PS C:\> iex (New-Object Net.WebClient).DownloadString("https://github.com/jhochwald/UniFiTooling/raw/master/Install.ps1")

Download from GitHub

You will find tha latest version in the release page of the GitHub repository

GitHub release GitHub release Download Size

Clone the repository

Or clone this GitHub repository to your local machine, extract, go to the .\releases\UniFiTooling directory and import the module to your session to test, but not install this module.

Feedback

Any Feedback is appreciated! Please open a GitHub issue as Bug report if you find something not working.

GitHub issues GitHub issues-closed

Contribute

Anything missing? Please open a GitHub issue as Feature request. Suggest an idea for this Module will help to improve this module.

PRs Welcome GitHub pull-requests GitHub pull-requests closed

Please read our Contribution Guide and Code of Conduct.

Note

Early beta version, use at your own risk! Not ready for showtime (production) yet...

Config

Keep this file in a secure place, especially in a shared environment. It contains the credentials (Yes, username and password) of your UniFi Admin User in plain text (human readable).

Here is a sample configuration:

{
   "Login": {
      "Username": "adminuser",
      "Password": "AdminPassword"
   },
   "protocol": "https",
   "SelfSignedCert": true,
   "Hostname": "unifi.contoso.com",
   "Port": 443
}

Username

The login of a UniFi User with admin rights

Password

The password for the user given above. It is clear text for now. I know... But the Ubiquiti UniFi Controller seems to understand plain text only.

I plan to use a hashed and/or encryted version for a future version. But during the runtime, it is still as human readable clear text in memory and the Invoke-UniFiApiLogin furthermore, sends it as human readable clear text information within a JSON formatted body.

protocol

Valid is http and https. Please note: http is untested and it might not even work!

SelfSignedCert

If you use a self signed certificate and/or a certificate from an untrusted CA, you might want to use true here. This is a Bool, but only true or false for now. I use this directly in PowerShell.

Please note: I can be dangerous to trust a certificate without checking it! I think it is OK to do within an Intranet, but I would avoid doing it over the public Internet! Especially with the Invoke-UniFiApiLogin command, because this will send the Credentials (Yes, username and password) of your UniFi Admin User in clear text in a JSON based body. If this is intercepted you might be in danger!

Hostname

The Ubiquiti UniFi Controller you want to use. You can use a Fully-Qualified Host Name (FQHN) or an IP address. Please note that your certificate must match the name and/or IP address as SAN name. Otherwise you might need to set the SelfSignedCert to true.

Port

The port number that you have configured on your Ubiquiti UniFi Controller.

Authors

Joerg Hochwald - http://hochwald.net

Contributors

N.N. (could be you)

Copyright

Copyright (c) 2019, enabling Technology All rights reserved.

License

BSD 3-Clause "New" or "Revised" License. - Online


GitHub license made-with-Markdown Open Source Love png1