I was given a list of 200 or so webpages so I could create shortcuts. Not just any old shortcut, but they needed to contain an argument to tell the browser to open a URL in full-screen kiosk mode. This is so that the user cannot immediately exit the page; beneficial for controlled environments and public portals.

After creating- I don’t know- twelve shortcuts; I thought, there has to be an easy way to do this.
It wasn’t too bad, just.. cumbersome.

It could be scripted, I thought.

I made the determination that I could create a function which is looped for each entry in a CSV input file.

So, I’m creating a CSV file with the following structure:

For example:

I’m calling this input.csv and I’ll put it in a new folder C:\script for example.

Then, I’ll open PowerShell ISE (or just plain ‘ol notepad) and save a new .ps1 file to my working directory C:\script

 

1. Define parameters:

 

2. Create a function that creates this specialized shortcut.

I’m calling this function “Create-Shortcut” for obvious reasons.

A few notes:

  • You can change the icon by defining an alternate path to an icon
  • You can optionally tweak the script to add a description for each shortcut in Windows
  • You don’t have to use the --kiosk argument!

2.5 Look into other chrome.exe arguments:

For example:

--no-referrers
--disable-background-mode
--incognito
--disable-plugins

 

3. Create a ForLoop

Here we are looking in the input.csv file for:

  • the name
  • the url

and we are running our function Create-Shortcut with the data parsed from the CSV.

 

That’s it!

Check your destination folder and look at all those pretty new shortcuts.

All together:


Leave a Reply

Related Posts

File Services

How to Enable Shadow Copies for a volume in Windows Server 2012 R2

Enable Shadow Copies (Enable Previous Versions) Click Start , point to Administrative Tools , and then click Computer Management .   In the console tree, right-click Shared Folders , click All Tasks , and then click Configure Shadow Copies .   The window that opens will look Read more…

File Services

How to use Robocopy to Preseed Files for DFS Replication

Use Robocopy to Preseed Files for DFS Replication I’ll write this here first, since it’s important: The folder in which you are robo-copying (ex c:\test) must not exist on the destination server (ex. f:\test). If you create Read more…

FreeNAS

FreeNAS Corral: Control Fan Speed for your Lenovo SA120 JBOD Enclosure

Earlier this year, I wrote an article on how to control the fan speed of your Lenovo SA120 JBOD from within FreeNAS. It turns out this doesn’t work on the newest FreeNAS 10 ( FreeNAS Read more…

%d bloggers like this: