
Scripts for lazy Windows admins
Being an administrator (lazy) some time ago, he wrote several scripts that automate a routine and allow you to be even more lazy. I don’t deal with administration anymore, and I spread the scripts, maybe someone will come in handy.
1. Auto-installation of the computer description locally and in AD.
The company had a standard for computer names, something like COMPUTERxxxx (xxxx is a number), accordingly Helpdesk was hard to find a computer for the initial diagnostics and remote connection by name of a person, and the explanation to the ordinary the user how to determine the computer name took a long time. The solution came in the form of a script.
setcompdescr.zip
After starting, all computers from the specified OU are woolly and sets the description depending on the logged in user.
* The script must be run from an account that has admin rights on computers and access to change the computer description in AD.
** Does not work correctly on Windows 2000, if the logged-in user is not a local administrator, it has not been tested with Windows Vista.
Before starting, you need to configure the script.
2. Auto-cleaning of the “exchange folder”
Each department in the company had its own folder, where other departments did not have access. For the exchange of information between departments (presentations, text, and music) they perverted as best they could. I had to create a folder for sharing and a script that cleans it so that the information does not lie there.
clear_exchange_v2s.zip
Script logic: files that have passed 10 days from the date of creation / modification are placed in a special folder inside the exchange folder (_deletion_queue_), after which the files are deleted completely from the “delete” folder after 7 days.
Everything is configured by variables in the script.
3. Redirecting the “Favorites”
Microsoft has provided a redirect to almost everything except the “Favorites”. Why is the mystery. The company had a strict rule that all data was stored on servers. The loss of the “Chosen One”, of course, is not fatal, but unpleasant. Therefore, I wrote a script that redirects the “Favorites” to a folder on the server.
redirect_favorites.zip
PS. Scripts were written "for yourself", so, before use, configure and check on something not important :-)
1. Auto-installation of the computer description locally and in AD.
The company had a standard for computer names, something like COMPUTERxxxx (xxxx is a number), accordingly Helpdesk was hard to find a computer for the initial diagnostics and remote connection by name of a person, and the explanation to the ordinary the user how to determine the computer name took a long time. The solution came in the form of a script.
setcompdescr.zip
After starting, all computers from the specified OU are woolly and sets the description depending on the logged in user.
* The script must be run from an account that has admin rights on computers and access to change the computer description in AD.
** Does not work correctly on Windows 2000, if the logged-in user is not a local administrator, it has not been tested with Windows Vista.
Before starting, you need to configure the script.
2. Auto-cleaning of the “exchange folder”
Each department in the company had its own folder, where other departments did not have access. For the exchange of information between departments (presentations, text, and music) they perverted as best they could. I had to create a folder for sharing and a script that cleans it so that the information does not lie there.
clear_exchange_v2s.zip
Script logic: files that have passed 10 days from the date of creation / modification are placed in a special folder inside the exchange folder (_deletion_queue_), after which the files are deleted completely from the “delete” folder after 7 days.
Everything is configured by variables in the script.
3. Redirecting the “Favorites”
Microsoft has provided a redirect to almost everything except the “Favorites”. Why is the mystery. The company had a strict rule that all data was stored on servers. The loss of the “Chosen One”, of course, is not fatal, but unpleasant. Therefore, I wrote a script that redirects the “Favorites” to a folder on the server.
redirect_favorites.zip
PS. Scripts were written "for yourself", so, before use, configure and check on something not important :-)