Added support for Unifi 2FA in 1.0.5 (unreleased). 2FA will be prompted for whenever the connection needs to be refreshed. This can interrupt script operation depending on how long the script is required to run. It is recommended that a local non-2FA account be created (via this module) so 2FA is not needed with automation.
Finally added support for statistics. Now you can get all the data points you might want for overall efficiency. Currently, all data sets are requested. Only types matching the type (ap, sw, gw, site) are returned. Please view the help, "Get-Help Get-UnifiSiteStatistic -Detailed" for more information on what fields match up with the graphs shown in the web UI.
Full Changelog: 1.0.4...1.0.6