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 ...

Get Pro Windows PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.