Book Image

PowerShell 3.0 Advanced Administration Handbook

By : Sherif Talaat, Haijun Fu
Book Image

PowerShell 3.0 Advanced Administration Handbook

By: Sherif Talaat, Haijun Fu

Overview of this book

<p>Technology’s growing rhythm is running faster than before, and business needs are getting more complex every day. So, it is time to learn something new to help conquer the challenge. With PowerShell in your toolbox, you can easily perform many tasks with less time, effort, and cost. PowerShell is a helpful scripting technology that enables the automation of system management tasks and the creation of system management tools.<br /><br />"PowerShell 3.0 Advanced Administration Handbook" comes with a set of real-world scenarios and detailed scripts that will help you get started with PowerShell, learn what PowerShell is, how to write the syntax, and build your scripts, and how to use and integrate PowerShell with different technologies, products, and tools.<br /><br />This handbook starts with the essential topics of PowerShell, then introduces the new features in PowerShell 3.0. The book then goes through building PowerShell scripts, function, and developing extensions like snap-ins and modules, and continues with detailed examples showing the usage of PowerShell with different technologies and products to give you an idea of PowerShell usage in the real world.</p>
Table of Contents (21 chapters)
PowerShell 3.0 Advanced Administration Handbook
Credits
About the Authors
Acknowledgement
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Getting started with Lync scripting


In this section, we will help you getting started with Lync Server scripting and automation using a set of Windows PowerShell scenarios and examples.

Scenario 1 – enabling Lync to user accounts

In this scenario, you are voice administrators who have recently installed Lync Server in the corporate network and want to enable the users for Lync in order to be able to use the Lync client on their machines.

  1. Get the list of available users using the Get-CsAdUser cmdlet, and then filter the results to make sure that retrieved users have e-mail addresses and are not enabled for Lync use.

  2. Define a variable called Users to store the list of filtered users.

  3. Use the ForEach loop to iterate over the list of users.

  4. Define a variable called SIP to store the parsed string of the user's SIP address.

  5. Use the Enable-CsUser cmdlet within the ForEach loop defined in the previous step to enable each user for Lync capabilities. Use the Get-CSPool cmdlet to get the Lync pool.

Use the...