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.
- Take a snapshot of the registry on an installed (but not configured) box.
- Perform the configurations (on the same box).
- Take a snapshot of the registry (same box).
- 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).
精彩评论