CHAPTER 8Functions, Scripts, and Remoting

This chapter completes the introduction to Windows PowerShell in SharePoint 2010 by covering three important components: functions, execution policies, and scripts. We will also look at running Windows PowerShell remotely.

Windows PowerShell Functions

Functions are used in most programming and scripting languages. A function is a named block of code that can be referred to from within Windows PowerShell. When a function’s name is called, the list of statements contained in the function is executed.

A function may accept input in the form of arguments, the values of which can then be used by the code inside the function. The output from a function can be stored in a variable, passed to another function, ...

Get PowerShell for Microsoft SharePoint 2010 Administrators now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.