Systems Management Question

Can we update a file using KACE?

05/31/2017 700 views
Can we update a file using KACE? need to update content of a file instead of replacing the file 

File:      VPN1.pcf 
Location:    C:\Program Files (x86)\Cisco Systems\VPN Client\Profiles


I  want to change the HOST=      to   HOST=
Answer Summary:
2 Comments   [ + ] Show comments


  • Why can you not replace it?
  • yes thats what i thought, but profiles is not same for all users so had to replace the content of the file instead of file.

Answer Chosen by the Author

You can use powershell to complete this task. This should do the trick:
(Get-Content "C:\Program Files (x86)\Cisco Systems\VPN Client\Profiles\VPN1.pcf") | ForEach-Object { $_ -replace "Host=.+", "Host=BlahBlahBlah" } | Set-Content "C:\Program Files (x86)\Cisco Systems\VPN Client\Profiles\VPN1.pcf"
Answered 05/31/2017 by: Desktop Jockey
Second Degree Green Belt

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ