Book Image

Learn PowerShell Core 6.0

By : David das Neves, Jan-Hendrik Peters
Book Image

Learn PowerShell Core 6.0

By: David das Neves, Jan-Hendrik Peters

Overview of this book

Beginning with an overview of the different versions of PowerShell, Learn PowerShell Core 6.0 introduces you to VSCode and then dives into helping you understand the basic techniques in PowerShell scripting. You will cover advanced coding techniques, learn how to write reusable code as well as store and load data with PowerShell. This book will help you understand PowerShell security and Just Enough Administration, enabling you to create your own PowerShell repository. The last set of chapters will guide you in setting up, configuring, and working with Release Pipelines in VSCode and VSTS, and help you understand PowerShell DSC. In addition to this, you will learn how to use PowerShell with Windows, Azure, Microsoft Online Services, SCCM, and SQL Server. The final chapter will provide you with some use cases and pro tips. By the end of this book, you will be able to create professional reusable code using security insight and knowledge of working with PowerShell Core 6.0 and its most important capabilities.
Table of Contents (26 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

PowerShell in Azure Cloud Shell


Azure includes an excellent feature called the Azure Cloud Shell. This is an integrated terminal in the Azure portal (portal.azure.com) that you can use with bash and PowerShell, to work with your resources. We will, of course, concentrate on PowerShell in this book. The following screenshot shows PowerShell in Azure Cloud Shell in action. The version that is currently used is using a Server Core container as you can see from the output of $PSVersionTable.

At the time of writing this book, PowerShell in Azure Cloud Shell is delivered as Windows PowerShell in a Windows Server 2016 Core container, which you can use to manage your resources. In the future, this will be replaced by PowerShell Core. To help you with resource management, you can also store data in the cloud shell. A 5 GB drive is mapped with a symbolic link inside of your $home directory, called clouddrive as you can see in the following screenshot.

You can use the cloud drive to store your scripts...