Altiris Agent Scan and Fix
Do you ever find that you have several computers that are no longer talking to the Notification Server even though they still have the agent running and are on-line? Here's how we keep our computers talking (even when they don't want to).
This script has proven very effective in fixing clients that have lost communication with the Notification Server. We run weekly reports on clients that have not talked in x number of days and then export that list of names to a text file.
This script uses ping and nslookup to check if the computer is still on the network. If it is, it deletes the machine's policy file, kills the agent process and the starts the service. The script uses a few utilities from Sysinternals, pskill, and psservice. Another utility we use, reg.exe, is part of Windows XP or it can be downloaded from the the Windows Resource Kit. These utilities need to be downloaded and stored locally on the PC the script is run from.
| License: | AJSL By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License |
| Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |

Comments
reg.exe
You do want to be careful on which version of reg.exe you have. Microsoft released different version with different command lines syntax. Go Figure.
Screenbert
Screenbert
This looks wonderful. However...
For some reason it is not working for me.
I'm getting nothing but, "Computer is not on the network. Duplicate DNS."
When I know for a fact that is not true.
Check NSLookup
Verify that the correct name comes up when doing a NSlookup on the IP address. The script pings the computer name and then takes the IP address that is returned and passes it to NSLookup.
If the name that is returned is not the same you will get the Duplicate DNS error. The reason for this check is the DNS cache does not allow flushing often enough so there can be multiple names linked to the same IP Address in DNS.
Environment Problems
Yeah, I was seeing that as I was trying to figure out why it was not working. I think that we are having some major DNS and WINS issues in our environment.
Unfortunately, I'm not sure when they are going to clean that up....hopefully soon.
Invalid Config file
Has anyone encountered this error? I get it immediately upon executing the script.
"Invalid Config file. Exiting..."
Invalid Config File
You will get that error if the path and filename are not correct for the PCList file. Make sure that the text file exists.
Invalid Config File
Thanks....
Hi, how can I exclude the
Hi, how can I exclude the nslookup thing from the script? I am getting "computer not found" error even though I am testing this script using my local PC as the target.
Thanks!
Comment out those lines
You will have to comment those lines out of the script.
NSLookup Fix
To fix the NSlookup section of the script, search the script for ".tyson.com" and replace with your domain name. The script adds this domain info, to the end of the PC name it has on file. This makes what NSlookup responds with match what it is comparing, and the NSlookup piece should work perfectly.
Worked for me anyway. :D
Nice script, thanks.
Needs to have silent ping and nslookup
If only you could improve the script so that it does not pop up the cmd box every time ping and nslookup runs. Otherwise it works great.
Took a while...
but I have this going now and i works very well. Thank you.
I do agree about the cmd box popping up...it would be nice if it didn't do that. takes focus away from what else you might be doing.
delete policy file
I see only a Function in the script for deleting a file. The function is never been called. Only the services are killed and restarted. Where is the policy file located?
Would you like to reply?
Login or Register to post your comment.