PowerShell Advanced Cookbook

Morten Elmstrøm Hansen

SKU: 9789355516732



ISBN: 9789355516732
eISBN: 9789355519627
Authors: Morten Elmstrøm Hansen
Rights: Worldwide
Edition: 2024
Pages: 684
Dimension: 7.5*9.25 Inches
Book Type: Paperback

PowerShell is a powerful scripting language, automation framework and command-line shell developed by Microsoft that is built on the .NET framework. It is an essential tool because it allows system administrators and developers to automate and optimize complex administrative tasks across multiple systems efficiently. PowerShell's deep integration with Windows and other Microsoft products makes it an invaluable tool for administrating, managing and optimizing Windows environments.

Designed as a cookbook, this book enables readers to expand and build upon their current PowerShell knowledge and skillset. Topics covered in detail include creating PowerShell unit tests using Pester, managing and administrating Azure and AWS cloud services, remote script execution, Active Directory management, PowerShell desired state configuration and more. Each chapter includes recipes that delves into the topics, accompanied by code examples and walkthroughs. 

After reading this book, readers would have gained the knowledge and skills that will enable them to build better and more advanced scripts and applications while also understanding key principles of automation and optimization. This will also aid the readers to streamline processes and enhance administrative tasks more efficiently using PowerShell.


  • PowerShell administration fundamentals.
  • Advanced scripting and automation.
  • Enterprise and cloud administration.


  • Develop advanced PowerShell functions, classes, and scripts with sophisticated flow control.
  • Manage errors effectively, including custom error classes, in scripts and background jobs.
  • Securely handle remote sessions using PowerShell remoting for enhanced management.
  • Utilize Pester for unit testing and mocking dependencies, ensuring script reliability.
  • Administer Active Directory objects and cloud services like Azure and AWS, including Microsoft 365 applications.
  • Build GUI applications and Windows services from PowerShell scripts with SAPIEN PowerShell studio IDE. 


This book is intended for developers and system administrators with a novice or intermediate understanding of PowerShell who are looking to advance their skills.

  1. Introduction to Advanced PowerShell Concepts
  2. Advanced PowerShell Functions
  3. Flow Control and Looping
  4. Error Handling
  5. Scripting Techniques
  6. Remote Script Execution: PowerShell Remote Management
  7. Testing with Pester 
  8. Working with XML and JSON
  9. Active Directory Management
  10. Managing Azure with PowerShell
  11. Managing AWS with PowerShell
  12. Microsoft 365 Applications Management
  13. Desired State Configuration
  14. Managing Windows Components
  15. SAPIEN PowerShell Studio IDE


Morten Elmstrøm Hansen is a dedicated IT professional and entrepreneur. For the past eight years he has been working at Energi Danmark, one of Denmark’s leading energy companies. He plays a central role in the IT operations department where he leverages his expertise in PowerShell development, DevOps and server administration to monitor, optimize and automate essential processes, ensuring operational continuity. Morten is proficient in containerization and kubernetes as well as cloud technologies and he utilizes his skills to be the forefront for larger projects involving such cutting-edge technologies.

His professional qualifications include a certification in PowerShell Administration, an AP degree in IT technology and additional courses in digital marketing. Morten also holds a mix of several other technical and commercial educations such as a business college education that provides a solid foundation in commerce and administration, with a focus on economics, sales, communication and IT. Furthermore, he has a higher technical education that combines technical and scientific subjects with general academics. Additionally, he pursued a higher preparatory examination focusing on mathematics and psychology, further preparing him for his academic and professional pursuits in technology.

In addition to his role in IT, Morten co-owns and serves as the part time CFO of a family cleaning business. He also owns and manages an online store, where he applies his skills in digital marketing, IT and economics. His diverse roles demonstrate his ability to navigate and excel in multiple fields, from IT management and development to business operations.

On a personal note, Morten is a devoted family man, living with his wife and two youngest children, on the outskirts of one of Denmark’s largest cities.

You may also like

Recently viewed