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

Azure Cloud Shell


Azure Cloud Shell can be found in the Azure Portal, as shown in the following screenshot:

Afterwards, the Shell will open either in Bash or PowerShell. The connection will look like this and opens in the Azure drive (Azure:):

The PowerShell version that is used for PowerShell in Azure Cloud Shell currently is version 5.1 in the Desktop Edition, which is hosted in a Docker container. We will elaborate on that in Chapter 14, Working with Azure which is dedicated to PowerShell and Azure:

Features of PowerShell in Cloud Shell

The PowerShell experience builds upon the benefits of Azure Cloud Shell, such as the following:

  • Secure automatic authentication from virtually anywhere
  • Choice of shell experience that best suits the way you work
  • Common tools and programming languages included that are updated and maintained by Microsoft
  • Azure File Storage, which allows access to an Azure file share in a storage account for a small monthly fee associated with data storage. File Storage is mapped as the cloud drive and can be used to exchange data.

The PowerShell experience adds the following:

  • The new PSDrive for Azure (Azure:)—this provides easier searching capabilities within Azure resources
  • Dedicated and built-in commands
  • Data persistence via cloud drive
  • Custom modules
  • User profile
  • Rich tools support
  • Azure PowerShell
  • Nano and VIM (with PS IntelliSense)
  • Git and sqlcmd

For more information on PowerShell features, refer to https://aka.ms/cloudshell/PowerShell-Docs.

The first big achievement here is the new Azure drive. Here, you can just work directly on Azure and retrieve your Azure resources, as shown in this screenshot:

Feedback on Azure Cloud Shell is tracked on UserVoice via issues and feature requests: https://feedback.azure.com/forums/598699-azure-cloud-shell.