Written by Giles Bennett
Most of the time scripts will operate at the default store level. But in case you need to target a specific store, and don't know the ID, then the following simple script will list store IDs for each store on your domain :