NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
nappa
May 14, 2013Aspirant
Remote shutdown on OS 6?
Is there a way to do a remote shutdown on OS 6? I found this for older versions: viewtopic.php?p=94750 but nothing for OS 6.
ciarpame
Jan 10, 2014Tutor
Thank you very much chirpa, I was able to find the Chrome way by myself but I was missing the right CURL syntax.
My Readynas is a NV+ V2 so I suppose is OS5. Anyway xml syntax is almost identical. This is my working CURL command (xml captured with chrome dev tools):
curl -s -v -u admin:password -k "https://IP_OF_NAS/dbbroker" -H "Content-Type: application/x-www-form-urlencoded;" -H "X-Requested-With: XMLHttpRequest" --data "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <xs:nml xmlns:xs=\"http://www.netgear.com/protocol/transaction/NMLSchema-0.9\" xmlns=\"urn:netgear:nas:readynasd\" src=\"dpv_1389313459000\" dst=\"nas\"> <xs:transaction id=\"njl_id_725\"> <xs:custom id=\"njl_id_724\" name=\"Halt\" resource-id=\"Shutdown\" resource-type=\"System\"> <Shutdown halt=\"true\" fsck=\"false\"/> </xs:custom> </xs:transaction> </xs:nml>"
Shri-Ganesh
Oct 27, 2015Tutor
For the 6.4.0 OS:
curl -u admin: password -k "https://IP_OF_NAS/dbbroker" -H "Content-Type: application/x-www-form-urlencoded;" -H "X-Requested-With: XMLHttpRequest" --data "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xs:nml xmlns:xs=\"http://www.netgear.com/protocol/transaction/NMLSchema-0.9\" xmlns=\"urn:netgear:nas:readynasd\" src=\"dpv_1445852944000\" dst=\"nas\"><xs:transaction id=\"njl_id_2269\"><xs:custom id=\"njl_id_2268\" name=\"Halt\" resource-id=\"Shutdown\" resource-type=\"System\"><Shutdown halt=\"true\" fsck=\"false\"/></xs:custom></xs:transaction></xs:nml>"
- SandsharkApr 04, 2016Sensei - Experienced User
How about directly from PowerShell instead of having to install cURL? How would one convert all of those cURL options into a PowerShell Invoke-RestMethod CmdLet?
- InteXXSep 06, 2016Luminary
This is a little bit late, but here's how to do it in PowerShell 3+:
$Hostname = "readynas" $Username = "username" $Password = ConvertTo-SecureString "password" -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential($Username, $Password) $Headers = @{ "Content-Type" = "application/x-www-form-urlencoded"; "X-Requested-With" = "XMLHttpRequest" } $Xml = '<?xml version="1.0" encoding="UTF-8"?><xs:nml xmlns:xs="http://www.netgear.com/protocol/transaction/NMLSchema-0.9" xmlns="urn:netgear:nas:readynasd" src="dpv_1368497621000" dst="nas"><xs:transaction id="njl_id_1278"><xs:custom id="njl_id_1277" name="Halt" resource-id="Shutdown" resource-type="System"><Shutdown halt="true" fsck="false"/></xs:custom></xs:transaction></xs:nml>' $Uri = "https://$Hostname/dbbroker" Add-Type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy Invoke-RestMethod -Credential $Credential -Headers $Headers -Uri $Uri -Method Post -Body $Xml
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!