Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Altiris Agent Scan and Fix

Updated: 10 Jul 2008 | 13 comments
robertser's picture
0 0 Votes
Login to vote

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

Screenbert's picture
20
Mar
2007
0 Votes 0
Login to vote

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

xmoreland's picture
22
Mar
2007
0 Votes 0
Login to vote

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.

robertser's picture
30
Mar
2007
0 Votes 0
Login to vote

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.

xmoreland's picture
02
Apr
2007
0 Votes 0
Login to vote

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.

Aggie87's picture
30
Apr
2007
0 Votes 0
Login to vote

Invalid Config file

Has anyone encountered this error? I get it immediately upon executing the script.

"Invalid Config file. Exiting..."

robertser's picture
30
Apr
2007
0 Votes 0
Login to vote

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.

Aggie87's picture
01
May
2007
0 Votes 0
Login to vote

Invalid Config File

Thanks....

artsky's picture
09
May
2007
0 Votes 0
Login to vote

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!

robertser's picture
10
May
2007
0 Votes 0
Login to vote

Comment out those lines

You will have to comment those lines out of the script.

Evan Nadeau's picture
28
May
2007
0 Votes 0
Login to vote

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.

Jason Gallas's picture
31
Jul
2007
0 Votes 0
Login to vote

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.

xmoreland's picture
14
Sep
2007
0 Votes 0
Login to vote

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.

zijlp01's picture
25
Sep
2007
0 Votes 0
Login to vote

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?