2.79b to run script using command line in windows, preferably with a desktop shortcut or exe
Find the blender.exe and Right Click and select Create Shortcut



Due to permissions I cannot create a shortcut in the Blender folder so it offers to create it on the Desktop.

Find the shortcut and Right Click and select Properties



In the Target box append 

 -b c:\tmp\target.blend --python c:\tmp\exportscript.py


to the fully quoted blender.exe 
e.g.

"C:\Program Files\Blender Foundation\Blender\blender.exe" -b c:\tmp\target.blend --python c:\tmp\exportscript.py


Where target.blend is the blender file with the "pboard" object to export and exportscript.py is the original posters code with the "path" value set to match your environment.

I created a c:\tmp folder that has full permissions for the blender user and set the path

path = "C:\\tmp\\stl\\"


Now when I double click the shortcut, a command window flashes open briefly before closing. The file C:\tmp\stl\pboard.stl" is then available.