10325A_12

12
Module 12 Practical Administrative Automation

description

10325A_12

Transcript of 10325A_12

Page 1: 10325A_12

Module 12Practical Administrative

Automation

Page 2: 10325A_12

Module Overview• Use Windows PowerShell to independently accomplish a

real-world, practical, administrative task.

Page 3: 10325A_12

Lesson 1: Practical Lab Overview• Describe the process for accomplishing an administrative

task by using Windows PowerShell.

Page 4: 10325A_12

Starting from Scratch• Most of the labs covered previously have given you a very specific

set of tasks to solve. Those tasks in most cases were more granular than those you would

encounter in the real world. They are important because they have helped you explore and learn

specific PowerShell features. Yet they lack a broader production-environment perspective.

• For this task… Break the problem down into smaller components. Test and explore individual cmdlets. Think about how each task’s cmdlets will connect with each other. Experiment, explore, and grow comfortable with creating real-world

solutions with Windows PowerShell!

Page 5: 10325A_12

The Value of Confidence• The upcoming lab will require you to use skills that you have learned

during this course. That may include learning entirely new cmdlets, which you are well-prepared

to do by using cmdlet help.• The main point of this module…

• If you can complete this lab, then you can also move on to using PowerShell with other products… Microsoft System Center Microsoft SQL Server Microsoft Exchange Server Others…

…is to help you prove to yourself that you have learned enough to be effective in using Windows

PowerShell.

Page 6: 10325A_12

Discussion: Remember These Sticking Points• What problems or “gotchas” have you run into in this course?• What were the solutions?• What will you be especially careful of in the future?

• Remember… Read error messages Use Get-Member and Format-List * Take things slowly Try to complete tasks manually and pay attention

to the steps involved.

Page 7: 10325A_12

Lab A: New User Provisioning• Exercise 1: Create an Active Directory user account.• Exercise 2: Add users to security groups.• Exercise 3: Create a home folder.• Exercise 4: Copy files to the home folder.• Exercise 5: Create IIS virtual directories.• Exercise 5: Workflow automation.

• Estimated time: 240 minutes.

Logon information

Page 8: 10325A_12

Lab Scenario• When a new employee is hired, a provisioning process or

workflow must be initiated to… Create the user account in Active Directory Add the user to appropriate groups Create a home folder with proper permissions Create an IIS virtual directory for the user’s home directory Log everything to meet auditing requirements.

• Using Windows PowerShell, you must create an efficient process that is repeatable and consistent. The provisioning process needs to be able to handle a single

new user or a collection of new users.

Page 9: 10325A_12

Lab Review• What cmdlet is used to create a new user account?• What cmdlet or cmdlets did you use to modify access

control lists?• Could you use the same access control cmdlet for all

permission-related tasks?• What modules or PSSnapins did you have to use?• What value is there in an automated PowerShell solution

versus manually completing these tasks?

Page 10: 10325A_12

Lesson 2: Further Exploration• Describe additional Windows PowerShell features and

capabilities.

Page 11: 10325A_12

Additional Features Covered in the Appendix XML – the shell includes features for reading and modifying XML

documents, apart from the CliXML format used by Import-CliXML and Export-CliXML.

Advanced Functions – the penultimate form of modularization, these functions behave almost exactly like cmdlets written in a .NET language, but are written entirely in Windows PowerShell’s command/scripting syntax.

Events – the shell can register to receive notification of operating system events, and execute commands in response to those notifications.

Text manipulation and parsing, and regular expressions – the shell includes rich text manipulation features that can come in handy when you need to work with textual data, such as text log files.

Windows Forms and Windows Presentation Framework – the shell can interface with these .NET Framework technologies to produce graphical user interface (GUI) elements within your scripts.

Page 12: 10325A_12

Additional Features• PowerShell obviously contains much more than we can

cover in this course. Some additional major features you may wish to explore on your own include… Data Language and Internationalization enables you to

write scripts that use external files for text strings such as prompts or output. Such scripts can be more easily localized into different languages and cultures, which can be useful in multilingual environments.

Proxy / Wrapper Functions enable you to write a function that replaces a cmdlet. The functionality from the existing cmdlet is intact, but you can add or remove parameters to change the way other users can access or use the cmdlet.