Solved

C# and DHCP help me please

Posted on 2010-09-12
3
926 Views
Last Modified: 2012-05-10
I have a problem.I want to reservedip IP for client from anthor computer (from web server).


First i have DC(winserver 2003) computer domain is reg-mac.com with DHCP services.

Second : I have WebServer (winserver 2003-IIS6-DOT NET 2.0).

Finally : I have Active Directory accout RegMac  with granted permission in DHCP Administrator group.


In DC computer i log on with RegMac account,and use command 'netsh dhcp server \\10.22.1.210 scope 10.22.10.0 add reservedip 10.22.10.17 001e650236a6 test test' it work.


but i want use above command with RegMac account on webserver . How to do it ????

Does Anyone know ,or give me solution ?

Thank
0
Comment
Question by:tungdt
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 250 total points
ID: 33659997
You can use PsExec from SysInternals (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) and use this syntax

psexec \\WebServer_Name -u RegMac -p RegMac_Password netsh "dhcp server \\10.22.1.210 scope 10.22.10.0 add reservedip 10.22.10.17 001e650236a6 test test"

It should solve your problem
0
 

Author Closing Comment

by:tungdt
ID: 33673143
Thank for your solution
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 33674472
You're welcome
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question