Solved

C# and DHCP help me please

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Error - Add Failed 12 78
Secondary DNS Server 2008 R2 not kicking in 1 68
C# replace string in void with dR["myData"].ToString() 3 39
Name space syntax error 12 39
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
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 create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

929 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

12 Experts available now in Live!

Get 1:1 Help Now