January 2008
Intermediate to advanced
688 pages
19h 12m
English
After creating users, the next step is to create groups to store the users. The CreateGroup.ps1 script is similar to the CreateUser.ps1 script examined in the "Creating Domain Users" section earlier in this chapter.
Begin the CreateGroup.ps1 script with a param() statement. Create one switch parameter named -help, and three other parameters that are used to create the group. This line of code is shown here:
param($name,$ou,$dc,[switch]$help)
Next, create the funhelp() function, which is used to display help. The here-string contains the description, parameters, and syntax of the script and is displayed when the script is run with the -help switch. This section of code is shown here:
function funHelp() { $helpText=@" DESCRIPTION: ...Read now
Unlock full access