|
Home > Archive > General Discussion > July 2001 > How do I make a basic Script ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How do I make a basic Script ?
|
|
|
| How do I make a shut down script ?
When a user switches off their PC, i want to force the computer to release its IP address back to the DHCP server (ipconfig/release).
I want to import the script into GPO, but I just never made a script before ?
thanks,
ando | |
|
| i guess no-one knows then ... ? | |
|
|
| Joe Blacke 2001-07-26, 11:45 am |
| Ando,
Sorry for not getting back to you.
I'm at work right now, but as soon as I get a chance I'll walk you through it.
It's very easy. | |
| Joe Blacke 2001-07-26, 9:39 pm |
| Ando,
First, this is not the best method to make DHCP clients free up ip addresses. The best method would be to issue short leases. However, since you want to know how to release ip addresses by using a script in group policy:
Open notepad.
type ipconfig /release
Save the text as whateveryouwanttocallit.bat
This just made your script. Save it in the correct path for shutdown scripts. If you don't know the path, read below.
Open the group policy for the local pc, domain, site, or ou. Under windows settings, click on scripts. In the details pane, double click shutdown. Click on browse and it shows the correct location for shutdown scripts. Made sure your file "whateveryouwanttocallit.bat" is there and select it.
Exit your group policy making sure your new shutdown scripts are saved as part of the policy. On the client computers, you can either reboot them, run secedit /refrespolicy machine_policy, or wait for the security policy time to refresh based on it's own time frame.
Bada boom, bada bing. Your clients are now releasing their IP addresses upon shutdown.
I just ran a quick test here at home, and it worked just as described. | |
|
| thanks randy and especially joe !!
Its working great, just what i wanted !!!
thanks (again) !!
ando |
|
|
|
|