Posts

Showing posts from July, 2015
Using  Selenium WebDriver with PowerShell Hola todos... que pasa? This time I am going to show an example on how to use Selenium WebDriver with PowerShell to open the browser and do stuff like checking a checkbox or maybe writing some text in a text box. This one took me sometime to deal with it, it was not a straightforward thing, I spent so much time in front of my laptop, I lost the feeling on my ass for some time after finishing the code, anyway, To find more information about Selenium and how it works, you can dig this link :   http://www.seleniumhq.org/ this WebDriver was built for C#, and of course it can be used and called withing PowerShell or Vb.net easily... Anyway, let’s talk about the code : #Code Start Here : # moving to the folder where Selenium DLL files are… # You can also use Add-Type Cmdlet with -path option, it will do the same. cd "d:\NonOfficialPSModules\selenium-dotnet-2.46.0\net40" [System.Reflection.Assemb

IP Calculator in PowerShell...with IP exclusion

Hola todos... que pasa? It has been a while since i post i was really busy with so many stuff, bottom line, i had this strange requirement at work where i had to create a script to calculate the IP address from a subnet, now normally this means we have to create a bunch of scopes or subnets in the DHCP server, which was my case, i had to create more than 4 thousand scopes on Linux DHCP server. now I was thinking how in the hell I am going to insert all these scopes in the configuration file, of course the first things I came up with was to provide the mandatory information (First IP, last IP, broadcast IP and number of hosts) which was not a big problem, I found this link : https://gallery.technet.microsoft.com/scriptcenter/ipcalc-PowerShell-Script-01b7bd23 This guy did a very good job and save my ass, but this was not the issue, in my situation, I had to exclude the first 48 IP addresses from each scope. Now in Linux DHCP configuration file, each scope was represent