Obinice Posted March 27, 2008 Posted March 27, 2008 I wonder if anyone can help. One of our servers died, which incidentally had lots of applications installed on it. I managed to get all the apps back onto another server, no problem. However, all users share the same desktop, start menu and so on (different for each year group and staff members). The problem is, that during logging on a script is run to connect to the apps server, obviously I've changed the name from the server that died to the new one but the programs on the start menu are now dead links. Windows seems to store some info in the profile and I can fix it by deleting a users profile and when they log on, the profile is recreated and the links works. What I don't want to do, is have to go through 800+ profiles and delete everything but their favourites (I've been told by the head of IT that the favourites have to stay). Does anyone have a quick fix (if there is one) or an idea of how I can delete everything in a users profile directory apart from the favourites folder? Hope I've made sense. Thanks.
ChrisH Posted March 27, 2008 Posted March 27, 2008 Get a script to copy the favorites somewhere first, then delete all contents then copy it back. Not sure how well that would work though. You can also give the server the alias of the old server as well as the setting in registry that allows it to be referenced as that through a share. Ps get your teeth into DFS it will save you this trouble in the future.
powdarrmonkey Posted March 27, 2008 Posted March 27, 2008 I needed to do something similar last summer and ended up using a bash script on Cygwin. All the power of bash, with the prettiness of DOS Basically I walked down the profile tree, yanked out each favourites folder and moved it to the appropriate new location. If you tell me something about your environment I'll cook you something up. 1
jcollings Posted March 27, 2008 Posted March 27, 2008 The other thing we've done in the past is created a DNS record pointing the old name at the new server. This means that if something is going to \\server1 for example it still works as the \\server1 and \\newserver both resolve to the IP address of the new server. Saved us loads of time here in similar circumstances. You do need to edit the registry on the box to stop strict name checking - can't remember the key but it's easily googled.
Obinice Posted March 27, 2008 Author Posted March 27, 2008 I thought I'd have to do that. Thanks anyway. Just a quick question, don't want to sound totally dumb. I was thinking of a server alias or something like that, question is, how do I go about it? Do I have to do something in DNS?
jcollings Posted March 27, 2008 Posted March 27, 2008 I thought I'd have to do that. Thanks anyway. Just a quick question, don't want to sound totally dumb. I was thinking of a server alias or something like that, question is, how do I go about it? Do I have to do something in DNS? This may help Renaming a Windows 2003 Server - Server Networking 1
powdarrmonkey Posted March 27, 2008 Posted March 27, 2008 You certainly could. I scripted it because at the time we also moved lots of profiley stuff into the user's home directories, and then mapped the appropriately, like Favourites, App data, etc. So that they're loaded on demand instead of being pulled across during login. Kinda depends how worried you are about it happening again I guess.
FN-GM Posted March 27, 2008 Posted March 27, 2008 You could add a few lines to delete the existing shortcuts a few lins before the script creates them. What logon script is it? vbs?
Obinice Posted March 27, 2008 Author Posted March 27, 2008 Thanks for the help, I will try to sort this out in the morning.
powdarrmonkey Posted March 27, 2008 Posted March 27, 2008 I guess you want to copy out the favorites folder from each profile so you can delete everything else and give them a new one? For a share called 'profiles' where each user has one folder in the root, something like this will move all the favorites to 'someshare' and rename it to include the original profile name: for a in `ls`; do mv //server/profiles/$a/Favorites //server/someshare/$a_favs; done Assume a user jbloggs: it gets a directory listing of the profiles share into the variable $a, walks down into each profile, and moves the favorites folder to \\server\someshare, renaming it in the process to "$a_favs" (eg, jbloggs_favs). Just make sure you have permission to move stuff throughout the tree before you start, and watch the spelling of favorites. Have you ever used cygwin?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now