9
Click to edit Master subtitle style 04 | Advanced Functions Jeffrey Snover | Distinguished Engineer & Lead Architect Jason Helmick | Senior Technologist, Concentrated Technology

Jeffrey Snover | Distinguished Engineer & Lead Architect

Embed Size (px)

DESCRIPTION

04 | Advanced Functions. Jeffrey Snover | Distinguished Engineer & Lead Architect Jason Helmick | Senior Technologist, Concentrated Technology. Module Overview. The purpose to Advanced Functions An Advanced Function template Creating and testing parameters Adding your code - PowerPoint PPT Presentation

Citation preview

Page 1: Jeffrey Snover | Distinguished Engineer & Lead Architect

Click to edit Master subtitle style

04 | Advanced FunctionsJeffrey Snover | Distinguished Engineer & Lead ArchitectJason Helmick | Senior Technologist, Concentrated Technology

Page 2: Jeffrey Snover | Distinguished Engineer & Lead Architect

• The purpose to Advanced Functions

• An Advanced Function template

• Creating and testing parameters

• Adding your code

• Writing objects out to the pipeline

Module Overview

Page 3: Jeffrey Snover | Distinguished Engineer & Lead Architect

The purpose to Advanced Functions• You can create functions that are similar to cmdlets using

PowerShell

• These are not the same as compiled cmdlets, but are perfect the for IT pro!

Page 4: Jeffrey Snover | Distinguished Engineer & Lead Architect

Advanced Function template

• You can make your own

• The ISE has built-in templates

• Try Ctrl-J

Page 5: Jeffrey Snover | Distinguished Engineer & Lead Architect

Creating and testing parameters• Can test params using IF and Foreach constructs

Page 6: Jeffrey Snover | Distinguished Engineer & Lead Architect

Adding your code• The Foreach iterates through the computer names

• Place the properties into a hash table

Page 7: Jeffrey Snover | Distinguished Engineer & Lead Architect

Writing objects out to the pipeline

• New-Object

Page 8: Jeffrey Snover | Distinguished Engineer & Lead Architect

Questions or comments?

Page 9: Jeffrey Snover | Distinguished Engineer & Lead Architect

©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.