Have a client that wanted to completly disable thier Guest Captive Portal SSID during school hours so that students were not using it during the day. There is no way to schedule when an VAP is active and the setting "Deny Hours" (VAP/Advanced) only prevents people from getting a successful connection. The SSID is still broadcast and you can still connect to it, just not get the Captive Portal to complete the login. They did not want to even see the SSID.
I developed and tested the attached Tera Term Macros. Install Tera Term from http://logmett.com/index.php?/products/teraterm.html (tested with v4.88), modify the attached scripts for your controller IP, username, password, enable password,controller prompt, and VAP name, then simply run the scripts from the command prompt or schedule with Task Scheduler:
C:\Program Files (x86)\teraterm>ttpmacro.exe Public_Off_Generic.ttl
C:\Program Files (x86)\teraterm>ttpmacro.exe Public_On_Generic.ttl
UPDATE:
Unable to get the scripts to work with the Task Scheduler, so I went back and wrote the same thing using visual basic and OpenSSH. Download and install OpenSSH from here (http://www.mls-software.com/opensshd.html) following the directions given here (https://www.simplehelp.net/2016/03/13/how-to-ssh-from-windows-10/). Then download the new attachment (Aruba_VBS.zip), modify for your enviroment and have at it.
Note: you will need to run the "ssh <ip address> -l <account>" once from the command prompt and install the public key from your controller
Thanks,
Jim