Skip to Content
Microsoft® Windows® Scripting Self-Paced Learning Guide
book

Microsoft® Windows® Scripting Self-Paced Learning Guide

by Ed Wilson
April 2004
Beginner
416 pages
11h 3m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting Self-Paced Learning Guide

Summary

In this chapter, you examined using subroutines to facilitate code re-use within a single script. You looked at the advantages of using subroutines: making scripts easier to read, easier to change, and easier to write. You used a real-world example to look at the use of subroutines to perform logging when creating a large number of new users and assigning those users to groups. In the script example in this chapter, all the code associated with the logging operation was placed into a subroutine. This subroutine could easily be added to several of the other scripts examined in this book. The only trick would be to make sure you were consistent with the variable naming convention used in the subroutine.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows® 2000 Scripting Guide

Microsoft® Windows® 2000 Scripting Guide

Microsoft Corporation
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 9780735619814Supplemental ContentCatalog PageErrata