A bit of background is that the SH2 wireless drops out nearly every few days without fail. I've selected channels which have least traffic on, which again seems to last only a few days before dropping out again. When it drops I can't get on to the web GUI to reboot the router via a browser but the IP will still ping.
I felt a script would be the best way to achieve what I'm trying to resolve, aside from that I reckon the router maybe faulty or due an upgrade?
I've been on the phone to VM support many times and they say there's nothing wrong with it but to be honest they don't seem to test much or understand what I'm telling them when I try to help them diagnose. Everything they suggest i.e reboot or change the channel will resolve it for a few days and I guess they see that as fixed. Wired connection is fine btw, it has dropped a few times but I assume this is VM network rather than my cable.
Thanks for posting to let us know that you've been experiencing some script reboot errors, I apologise for any inconvenience.
I have tested things from here and I can't see anything out of the ordinary, in fact the connection looks great! No errors or time outs showed up from here and all of the power levels are within the preferred ranges.
Are you still having these issues? If so, please respond to me here with a recent copy of your Hubs logs for me to compare with the data we have here. You can find these by opening your internet browser and typing 192.168.0.1 into the address bar, before logging in it will say 'Router Status' in the top right hand corner, click there and all the information needed is inside.
Also when these errors occur,. is there any noticeable change to the Hubs logs?
Tech fan? Have you read our Digital life blog yet? Check it out
I got the script working in the end, I wrote a little ps1 to add the username and password then call the original script which rebooted the router nicely. Then we had a powercut the other day and the router is now completely broken!
I'm guessing the hardware was on the way out and this was possibly why I needed to reboot the router so much.
I'll report back when we receive the new Hub and let you know if I still have to reboot it daily.
Hi TheHirthinator Do you have copies of the scripts you can post? I've tried to use Ben Neise's script for day's and got no where. I wonder if it has something to do with the SuperHub 2 not asking for a username but I've tried to edit that out with no joy.
What are you doing at the moment? I'm not sure how well you know Powershell or anything about this process so don't be offended if I'm teaching you to suck eggs, at least if I make it step by step everyone can understand
Basically there's a few steps, don't touch the original restart VM SH2.ps1 script from Ben.
Try it manually first to see if you can get the router to reboot without error.
1. Open Powershell as admin
2. Type: Set-ExecutionPolicy Bypass then confirm with y
3. Type: Import-Module [the destination of Ben's script]
Just change the IP address and password to your parameters but leave the username as admin.
My script basically does what I've explained above but I don't think I can attach it here. I'll copy it in plain text if you want to automate the process like once a night with task scheduler or something
Thanks for your response. I know only very little about Powershell so definately not offended :-)
I followed you directions but it came up with error
PS C:\Windows\system32> Import-Module C:\temp\reboot.ps1
PS C:\Windows\system32> Restart-VirginRouter -RouterIP "192.168.0.1" -Username "admin" -Password "***********"
VERBOSE: GET http://192.168.0.1/ with 0-byte payload
Invoke-WebRequest : The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
At C:\temp\reboot.ps1:51 char:11
+ $r1 = Invoke-WebRequest -Uri ("http://" + $routerIP + "/") -Sessi ...
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Cannot index into a null array.
At C:\temp\reboot.ps1:52 char:5
+ Invoke-WebRequest -Uri ("http://" + $routerIP + $r1.forms.acti ...
+ CategoryInfo : InvalidOperation: (:) , RuntimeException
+ FullyQualifiedErrorId : NullArray
Obviously the second part of the script, the actual reboot didn't work either, because the first problem is logging in. This is similar to my first attempts when I thought the issue might be the "admin" parameter when it doesn't exist on the login page.
I thought I might have corrupted Ben's code and his site seems to be down at the moment, but I got a fresh copy from github and that's the same.
[MOD EDIT: Personal and private information has been removed from this post. Please do not post personal or private information in your public posts. Please review the Forum Guidelines]