Skip to main content


Showing posts from August, 2010

Get DNS-information using WMI

With the purpose of automation DNS documentation I needed to get information programatically from the DNS servers. The answer to this, and many other similar tasks is spelled  WMI . That is short for  Windows Management Instrumentation , which is an infrastructure for getting information from Windows using a specific query language. Here is a method to get the host names and IP addresses for each A-record on the specified domain. public string Server = ""; public string Domain = "domain.local"; public string Username = "DOMAIN\User"; public string Password = "Pa$$w0rd"; public Dictionary<string, string> GetHosts() { Dictionary<string, string> hosts = new Dictionary<string, string>(); ManagementScope scope = new ManagementScope(String.Format(@"\\{0}\Root\MicrosoftDNS", Server)); scope.Options.Impersonation = ImpersonationLevel.Impersonate; scope.Options.Username = Username; scope.Opti

Windows Server 2008 R2 and AD for RADIUS-authentication for Cisco-routers

Instead of investing in a TACACS server solution we wanted to build switch and router logon on Active Directory authentication. This is possible by installing a RADIUS server to handle the communication between the Cisco devices and Active Directory. Windows Server 2008 R2 can be made into a RADIUS server by installing the role  Network Policy Server . Aaron Walrath  has put together a guide with everything that needs to be done to get the RADIUS authentication in the Cisco devices and how to connect this to the Active Directory. This guide is divided into two blog posts. RADIUS authentication for Cisco router logins Install Windows 2008 R2 NPS for RADIUS authentication for Cisco router logins