Run this script on the database you want to generate the create index script on. I have included configuration variables for all of the index options.
Setting this to 1 will generate online index statements if it is
supported for the edition you are using and if the datatype allows
This will allow you to specify a file group to store the secondary
indexes. If the index is clustered it will use the original file group.
Set this value to null to use the original file group
Setting this to 1 will set the drop and recreate the index if it
Setting this value will set the fill factor to the value you select.
Setting this value to null will use the original fill factor