O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21.3. Network Utilities

The network part of our automation tasks has not been forgotten by the PSCX developers. We have pretty good support for the Windows network, especially when it comes to working with Active Directory. If we are in a Windows network domain, we can ask the Active Directory for our DHCP server or the domain controller. We can do that with the Get-DhcpServer and Get-DomainController cmdlets, respectively. Here is how we can get that information:

PS> Get-DhcpServer ServerName Address ---------- ------- win2k3-test.TEST.local 192.168.0.1 PS> Get-DomainController ServerName : WIN2K3-TEST DnsHostName : win2k3-test.TEST.local Site : Default-First-Site Domain : TEST.local DN : CN=WIN2K3-TEST,OU=Domain Controllers,DC=TEST,DC=local ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required