Search icon CANCEL
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 2. Preparing for Administration Using PowerShell FREE CHAPTER 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

Flow Control Using Branches and Loops

In this chapter, we will cover the following recipes:

  • Using If–ElseIf–Else conditions to control script flow
  • Using Switch–Case conditions to control script flow
  • Learning to use delays
  • Writing a basic looping construct
  • Writing a more complex loop on a predefined array
  • Using the For loop construct
  • Using the While loop construct
  • Cleaning empty directories using the Do–While construct
  • Cleaning empty directories using the Do–Until construct
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 €18.99/month. Cancel anytime