Microsoft
Software
Hardware
Network
Question : Querying DHCP using PowerShell
My task is to query a Windows DHCP server using PowerShell. At the very least, I need to be able to get a list of the active leases (not reservations), including ip addresses and MACs. I'd like to avoid shelling netsh commands and parsing the text output, which is not an elegant solution, to say the least. I'd also like to keep from having to buy a third-party class library to use as an interface to the server. How can this be done using PowerShell?
Answer : Querying DHCP using PowerShell
Just need to capture the results. If you want errors you do like you would in cmd.exe
$results = netsh dhcp server MyServer.MyDomain.com show scope 2>&1
Random Solutions
Out of office assistant not forwarding mail when reply message is blank or empty.
Problems with BASC-2 POP and Data On the Run 5.0 for HP iPAQ
Problem of calling Curl by Perl
eSATA Limitations?
Win98se Won't Boot Up, Can Hear Fan, Monitor says "No Signal"
How to increase rules in outlook 2007
How to install an application software on Linux Red Hat Pro 7.3
Corrupted JPG
Publishing my documents in citrix 4.5
How to plug an IDE cable from a motherboard to a laptop's Hard drive