January 2008
Intermediate to advanced
688 pages
19h 12m
English
There may be times when you need to create multiple shares simultaneously. One way to do this is to modify the CreateShare.ps1 script to accept multiple share names and folder names from the command line. To do this, use the CreateMultipleShares.ps1 script.
Example 5-15. CreateMultipleShares.ps1
param($folderPath, $shareName, $maxAllowed=5, $description="Created by PowerShell") function funHelp() { $helpText=@" NAME: CreateMultipleShares.ps1 Creates multiple shares on a local machine using default permissions The folder to be shared does not need to exist as the script checks for the existence of the folder and will create it if it is not present PARAMETERS: -folderPath Specifies the path to the folder you wish to share ...Read now
Unlock full access