Solved

C# and DHCP help me please

Posted on 2010-09-12
3
906 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
This collection of functions covers all the normal rounding methods of just about any numeric value.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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 …

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now