I am new to Powershell. I want to create a script to add specific bookmarks to a user’s Chrome browser when setting up their account with them. I would put it on a USB drive and share it with my team.
I have found a script that does this and created an EXE with it but I need to know how to add not just one bookmark but multiple. I can see somewhat is going on with the script but I’m not familiar enough to understand enough to add more to the script to add multiple bookmarks.
This forum is more about questions you have with code you wrote by yourself than reviewing, customizing or enhancing scripts you’ve found on the internet.
I’d recommend to ask the author of the script for help.
The easiest solution would be to run the script multiple times.
It’s not that hard …
The first 2 lines read the bookmarks file.
Line 3 to 23 define the needed functions
Line 24 creates a new bookmark for the URL “https://www.google.com/” with the name “Google”
Line 25 adds this newly created bookmark to the already existing bookmarks in the variable $dataBookmarks
Line 26 converts the PS objects containing all the bookmarks to a string representation in the format JSON.
And the last line writes all this back to the disk.
Now it’s up to you to decide what lines you have to duplicate to add more than one bookmark.
As far as the forum being for scripts I’ve written myself I understand. Is there another forum area here that would be more appropriate or do you have any suggestions for forums elsewhere that would?
Just looking for help and I appreciate your input.
As far as I’m concerned all free peer to peer forums focus on helping you helping yourself. And if you carefully read my first answer you have actually all you need. Have you concidered asking the author of the script for help?
I understand and I do want to learn PowerShell. I kind of understand what’s happening in the script and I will be looking for what I need to do to add another bookmark. I was just wanting a little help but I will work on it because I want to fully understand how it works and be able to write scripts myself.
I will read over your reply again and work on it.
Thank you