Using Kace to modify text within a file
Does anybody use Kace to modify text within a file? I would like to change some parameters in different configuration files in Mac and Windows and not have to reinstall the entire software.
Well, this is usually a relatively easy task. Check with the vendor how to do this via CLI (most vendors have a special tool for such things that the changes have been not only done in the config file but also used in the tool already.
If not the best way is to create the "new" text file and use a File Sync to bring it to the client systems (Distribution |File Sync)
If this is not an option it really depends on the OS.
if you want to replace aaa=bbb with aaa=xxx (usual thing in config files)
For Linux and Macos you would run something like
sed -i "/aaa=bbb/c\aaa=xxx" config.confFor Windows you would run something like
powershell -Command "(gc config.conf) -replace 'aaa=bbb', 'aaa=xxx' | Out-File config.conf"