开发者

Configure and Enable Routing and Remote Access

Is there a way to enable and than configure routing and remote access on windows server 2008 r2 using a (c#,vb).net script? What i need to do is:

  • Enable Routing and Remote acces开发者_如何学编程s
  • Configuration:
    • Select: Virtual Private Network (VPN) and NAT
    • Choose Network Interface to use based on given IP subnet
    • Select: Assign IP: Automatic ...and so on.


It is not a high-fidelity solution to your problem, but the following technique has helped me out in a lot of situations.

  1. Take a snapshot of the registry on an installed (but not configured) box.
  2. Perform the configurations (on the same box).
  3. Take a snapshot of the registry (same box).
  4. Perform a difference check on the two registries (some use windiff, some gnu tools)

Often this technique will be enough to capture configuration changes. The only time it fails is when a program is written to not use the registry.

Once you have a clear picture of which registry keys are associated with the changes, you can script up some small thing (language of your choice) to set the keys appropriately.

Not as good as an answer like "change these keys to X"; but, you'll find that the technique above are typically reusable for a variety of script oriented configuration items (provided that they are effected through the registry).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜