XML : Using the Compare-Object in PowerShell, is there a way to make a comparison output based on alternative conditions?

I'm writing a script that will compare a server configuration against baseline configuration as well as against a parallel server. Settings the script will check for include software versions, RAM allocation, directory locations, and free storage space, among other things.

My plan is to use three XML files; one for the baseline, one for the reference server, and one for the difference server.

The issue is, not every check on the configuration will be for equality. Used storage for example is based on a percent of total space, directory checks will need to ignore certain characters, etc.

What would be the best way for me to approach this problem? Is there a way in the XML itself for me to make it dynamic? Would there be a decent way for me to change the XML values in the code? Is there another better angle I'm not thinking of?

No comments:

Post a Comment