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
Convert Access 97 Databases Programmically to Access 2003 File Format
Parsing XML in Oracle
Coldfusion 8 install broke Sharepoint on IIS 6.0
Event ID 1029 - Is this a sign of intrusion?
Self-Extracting ZIP (exe) receiving "license enforcement" error on Windows 2003 Server - installing Crystal Reports Server
Using javascript function check, how do I code a form page that forces the user to click one of the radio buttons before sending the page?
AJAX with timer
DIG vs NSLOOKUP
Windows 7 Explorer.exe runas not working
error 1053