Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PowerShell Core for Linux Administrators Cookbook

You're reading from   PowerShell Core for Linux Administrators Cookbook Use PowerShell Core 6.x on Linux to automate complex, repetitive, and time-consuming tasks

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789137231
Length 566 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ram Iyer Ram Iyer
Author Profile Icon Ram Iyer
Ram Iyer
Prashanth Jayaram Prashanth Jayaram
Author Profile Icon Prashanth Jayaram
Prashanth Jayaram
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Introducing PowerShell Core FREE CHAPTER 2. Preparing for Administration Using PowerShell 3. First Steps in Administration Using PowerShell 4. Passing Data through the Pipeline 5. Using Variables and Objects 6. Working with Strings 7. Flow Control Using Branches and Loops 8. Performing Calculations 9. Using Arrays and Hashtables 10. Handling Files and Directories 11. Building Scripts and Functions 12. Advanced Concepts of Functions 13. Debugging and Error Handling 14. Enterprise Administration Using PowerShell 15. PowerShell and Cloud Operations 16. Using PowerShell for SQL Database Management 17. Using PowerShell with Docker 18. Other Books You May Enjoy

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.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image