Archive Settings issue through script

This is Manish. I have made a script to read the archive settings profile document and am now changing the values of some of the fields but after running that agent and clicking on the archive settings, I am getting the below error

I have a problem reading the archive settings and getting the following problem.

“Error Reading Archiving Settings: Incorrect archive profile. The archive settings must be resaved to enable archiving.”

Thanks in advance

Manish