Hello,I am currently working on automating SSRS installs and need a way of changing a few entries in the .ini file. I've done a fair bit of reading, but there seems (as there always is) several ways of going about it, and I'm having trouble picking a direction.I'm thinking I can Get-Content and then replace some entries (service account, instance name, service account etc..), but when I replace them, do I set them up as parameters or variables at the beginning?I also read that I can get the contents into a hash table, change the entries, and then right back to disk, but from what I have read this does not appear the best way.Ideally, I'd like be able to have something that allows me to do something like...NAME OF POWERSHELL SCRIPT Param1- "instancename" -Param2 "ServiceAccount" etc.orNAME OF POWERSHELL SCRIPT $instancename "TheInstanceName", $SrvAccount "ServiceAccount"...but I am not sure of the initial direction to go in. Would someone please provide me with some advice on what I need to use/employ to get started down this road? I'd also like to hear how some of the more experienced guys here would go about it, perhaps that will help me.I thought that I would need to start the script with a list of variables or parameters laid out then have, say, Get-Content to get the file contents and replace the existing entries with the new values.Does this seem correct? Thank you in advance for any advice given.Kind regards,D.
↧