Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • PowerShell Core for Linux Administrators Cookbook
  • Toc
  • feedback
PowerShell Core for Linux Administrators Cookbook

PowerShell Core for Linux Administrators Cookbook

By : Prashanth Jayaram , Ram Iyer
close
PowerShell Core for Linux Administrators Cookbook

PowerShell Core for Linux Administrators Cookbook

By: Prashanth Jayaram , Ram Iyer

Overview of this book

PowerShell Core, the open source, cross-platform that is based on the open source, cross-platform .NET Core, is not a shell that came out by accident; it was intentionally created to be versatile and easy to learn at the same time. PowerShell Core enables automation on systems ranging from the Raspberry Pi to the cloud. PowerShell Core for Linux Administrators Cookbook uses simple, real-world examples that teach you how to use PowerShell to effectively administer your environment. As you make your way through the book, you will cover interesting recipes on how PowerShell Core can be used to quickly automate complex, repetitive, and time-consuming tasks. In the concluding chapters, you will learn how to develop scripts to automate tasks that involve systems and enterprise management. By the end of this book, you will have learned about the automation capabilities of PowerShell Core, including remote management using OpenSSH, cross-platform enterprise management, working with Docker containers, and managing SQL databases.
Table of Contents (19 chapters)
close

To get the most out of this book

Before you begin, you need to have some basic knowledge of how Linux works. That is to say, you need to know what a desktop environment is, or how to work with a package manager. You also need to know how to troubleshoot basic errors. Knowing the very basics of what a for loop is, or what Switch–Case is, would help you learn faster.

Also, if you are new to PowerShell, reading the first chapter is recommended. This chapter contains a couple of important guidelines for working efficiently with PowerShell.

The book also assumes that you are working on either Ubuntu or CentOS. While PowerShell constructs themselves do not behave differently with different Linux flavors (or even different platforms), the installation—and sometimes the configuration—may be different on different flavors of Linux.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the on-screen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/PowerShell-Core-Linux-Administrators-Cookbook. In case there is an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalogue of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, path names, dummy URLs, user input, and Twitter handles. Here is an example: "Create a file called simply script.ps1."

A block of code is set as follows:

Get-Date
hostname
Write-Output "Hello, $env:username!"

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

$Date = Get-Date
if ($Date.DayOfWeek -in 'Saturday', 'Sunday') {
Write-Host 'It is a weekend!'
}
else {
Write-Host 'It is a weekday.'
}

Any command-line input or output is written as follows:

PS> Get-Process dconf-editor
PS> Stop-Process -Id 20608

Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Click the Cloud Shell icon in the top navigation bar of the Azure portal; select either Bash or PowerShell."

Warnings or important notes appear like this.
Tips and tricks appear like this.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete