I want to add my internal network folders to the trusted sites dynamically because Excel is blocking the macros inside them (when opening the Excel document via network folder). I want my users to be able to read and update the document as their wish, meaning that I don't want to make local copies of the file onto the user's computers every time they want to use, edit or add a macro.
Is there a way to replicate the "Internet Options -> Security -> Trusted sites -> Sites -> Add site" process using a PowerShell (or a bash) script?
If you want to add the domain name to the trusted site list in the IE browser then you could refer to the Powershell script example below.
If you want to add the IP address to the trusted site list in the Ie browser then you could refer to the Powershell script example below.
Note:
A key in this path already exists
then you need to modify the key name (e.g. Range2, Range3, etc.)Further, you could modify the above example as per your requirements.