Microsoft has provided a sample script that creates user folders and shares. See Knowledge Base article Q234746.