chef 3745 Posted April 17, 2017 Share Posted April 17, 2017 (edited) Wow, so powershell is an extremely powerful utility in windows that I just started to learn. The reason was because my ISP is rotating my IP address which causes issues for my Godaddy domain and Emby. Here is what I did. Using this powershell script on Github and the Godaddy API: https://github.com/markafox/GoDaddy_Powershell_DDNS I run this script to check for any change in my IP address then post the new one to Godaddy servers. Sooooo sweeet! You need Powershell version 3.0 or higher to use it! I then created a little console app which checks the time and then runs the Powershell script. Here si the C# code: public static void UpdateDomain() { var startInfo = new ProcessStartInfo { FileName = @"powershell.exe", Arguments = "-ExecutionPolicy Unrestricted -NoProfile -Command \"" + Application.StartupPath + "\\godaddy_ddns.ps1\"", RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, CreateNoWindow = true }; var process = new Process {StartInfo = startInfo}; process.Start(); } if (DateTime.Now.Minute == 30 || DateTime.Now.Minute == 00) { try { UpdateDomain(); } catch { } } You'll have to put the script in a folder with the exe. also you'll have to do the whole "Console.Readline" stuff to keep the EXE running. It works like a charm! you need to get a Secret Key and API Key from a developer account at godaddy, if you're going to use the script... super easy. definitely worth the post here I think. I no longer have to monitor the DNS settings, and Emby is always available at my domain. Really kick-ass. Edited April 17, 2017 by chef Link to comment Share on other sites More sharing options...
Swynol 375 Posted April 21, 2017 Share Posted April 21, 2017 nice work. does your router support ddns? i use a ddns from namecheap. my router sends my new IP to name cheap so that all my domain stuff works. Link to comment Share on other sites More sharing options...
jordy 284 Posted April 21, 2017 Share Posted April 21, 2017 @@Swynol, same with me, my router is configured to send updated IP to No-IP to keep me up to date. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now