On This Page
IntroductionThis appendix contains a brief description of the scripts and other support files supplied with the solution. Although fully functional and tested with the solution, the scripts have not been through an extensive quality control process. They are intended to illustrate techniques and provide the basis for your own administrative scripts. You should fully test the scripts in your environment before deploying them in production. DisclaimerThe sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. Listing of Files in the SolutionThe following table lists all the files supplied with the solution. These are installed from the MSSWLANTools.msi Windows Installer file. Table D.1: List of Files Supplied with the Solution
Structure of the ScriptsThe Microsoft Visual Basic Scripting Edition (VBScript) files require some explanation to understand how they work together. Unlike many VBScript examples, the script files included with the solution contain multiple, often independent functions. To provide access to these different functions, these scripts use the "job" functionality of WSH. This allows several independent program functions to be contained in, and called from the same file by specifying a job name as a parameter to the script. There are two Windows Script (.wsf) files, which contain the user interface to all of the different script operations. The .wsf files call a set of .vbs files which contain the code that actually does the work for a particular job. You can call the job using the following syntax: cscript //job:JobNameWScriptFile.wsf Where JobName is the name of the operation and WScriptFile is the name of the XML interface file for the script. An excerpt from one of the .wsf files, where the job ConfigureCA is defined, is as follows: <?xml version="1.0" encoding="utf-8" ?> <package xmlns="Windows Script Host"> <job id="ConfigureCA"> <description>Configures the CA registry parameters</description> <script language="VBScript" src="constants.vbs" /> <script language="VBScript" src="pkiparams.vbs" /> <script language="VBScript" src="helper.vbs" /> <script language="VBScript" src="ca_setup.vbs" /> <script language="VBScript"> <![CDATA[ Initialize True, True ConfigureCA CloseDown ]]> </script> In this excerpt, the job definition specifies that the .vbs files namely, constants.vbs, pkiparams.vbs, helper.vbs, and ca_setup.vbs contain functions, subroutines, or data required by this job; therefore, they need to be loaded. The final section specifies the top–level functions to be executed to start the job; in this case, these functions include Initialize (which sets up logging), ConfigureCA (which performs the main job of configuring the CA), and CloseDown (which closes the log). In each of the .wsf files, the first job is defined to list the names (IDs) and descriptions of all of the jobs contained in the file. Thus, if the .wsf file is run without requesting a specific job, this default job runs and displays a short help screen with the names and descriptions of all available jobs in the file. The following table lists the jobs available in each of the .wsf files supplied with the solution. Table D.2: List of Jobs in MSSSetup.wsf
Note: The jobs marked with an asterisk (*) are not used in this solution. Table D.3: List of Jobs in MSSTools.wsf
Note: The jobs marked with an asterisk (*) are not used in this solution. Job OutputMost of the scripts log progress information to a console window and, in many cases, also to a log file. This information may include error information if the script encountered problems during execution. The monitoring scripts are the exception to this because they are designed to run as non–interactive scheduled jobs and not to send output to a console window. The scripts use a simple scrollable window to display their output. At the completion of each script, you are prompted to choose whether you want to keep the window open (for reference) or close it. For most of the setup procedures, the output is also logged to a file called %SystemRoot%\debug\MSSWLAN-Setup.log. Most regular operational tasks are not logged; however, the tasks that might have a significant security or operational impact, such as the import of IAS configuration, are logged. Tasks that could result in sensitive information being written to the log, such as adding RADIUS clients and generating RADIUS client secrets, are also not logged. Executing the JobsAlthough the scripts can be executed directly, there are two command shell batch (.cmd) files that help simplify the syntax. The syntax for executing the .wsf files directly is as follows: Cscript //job:JobName MssSetup.wsf Instead, you can use the .cmd files with the following simpler syntax: MssSetupJobName Running the .cmd file without specifying a job causes the first job (ListJobs) in the .wsf file to run; this job lists the IDs and descriptions of each job in the .wsf file. Certain jobs also take additional parameters. The syntax for running these jobs and the information on additional parameters are covered in the relevant chapters of this solution. The general syntax for specifying additional parameters is: MssSetupJobName /ParamName:ParamValue ParamName is the name of the parameter (for example "path" or "client") and ParamValue is the setting for that parameter (for example "C:\MyFile.txt" or "MyComputer"). Parameter values that contain embedded spaces must be enclosed in quotation marks ("). | In This Article |