Book Image

PowerShell: Automating Administrative Tasks

By : Michael Shepard, Chendrayan Venkatesan, Sherif Talaat, Brenton J.W. Blawat
Book Image

PowerShell: Automating Administrative Tasks

By: Michael Shepard, Chendrayan Venkatesan, Sherif Talaat, Brenton J.W. Blawat

Overview of this book

Are you tired of managing Windows administrative tasks manually and are looking to automate the entire process? If yes, then this is the right course for you. This learning path starts your PowerShell journey and will help you automate the administration of the Windows operating system and applications that run on Windows. It will get you up and running with PowerShell, taking you from the basics of installation to writing scripts and performing web server automation. You will explore the PowerShell environment and discover how to use cmdlets, functions, and scripts to automate Windows systems. The next installment of the course focuses on gaining concrete knowledge of Windows PowerShell scripting to perform professional-level scripting. The techniques here are packed with PowerShell scripts and sample C# code to automate tasks. You will use .NET classes in PowerShell and C# to manage Exchange Online. In the final section, you will delve into real-world examples to learn how to simplify the management of your Windows environment. You will get to grips with PowerShell’s advanced functions and how to most effectively administer your system. This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: [*] Getting Started with PowerShell by Michael Shepard [*] Windows PowerShell for .Net Developers Second Edition by Chendrayan Venkatesan and Sherif Talaat [*] Mastering Windows PowerShell Scripting by Brenton J.W. Blawat
Table of Contents (6 chapters)

Chapter 11. XML Manipulation

When you are working with Microsoft-based systems, there is a high probability that you are leveraging eXtensible Markup Language (XML) for data and communications. XML was created by the World Wide Web Consortium (W3C) to standardize the encoding of documents to make them both legible to humans and usable by computer systems. XML's format is very similar to that of Hypertext Markup Language (HTML). If you know the basics of HTML, you should be able to pick up XML pretty quickly. While the syntax is very similar between HTML and XML, the purposes of these languages are very different. HTML is used by web browsers to render objects and text on a website. XML is used to encapsulate data to be stored on a system, or passed between systems.

In this chapter, we will learn about:

  • The XML file structure
  • Reading XML files
  • Adding XML content
  • Modifying XML content
  • Removing XML content

XML file structure

When PowerShell interacts with XML, it leverages an XML reading...