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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows PowerShell for .NET Developers - Second Edition

You're reading from   Windows PowerShell for .NET Developers - Second Edition Efficiently administer and maintain your development environment with Windows PowerShell

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785287435
Length 330 pages
Edition 2nd Edition
Arrow right icon
Toc

Working with XML and COM

We explored the basics of WMI and CIM; and yes, that was just the basics. After completing the XML topic, we will discuss cmdlet definition XML (CDXML), which is used to map the PowerShell cmdlets, and the CIM class operations or methods.

I have seen most developers create XML files using Visual Studio and use some tools to compare XML. It's not a wrong method, but we have a much more convenient way to play with XML using PowerShell.

XML is the type accelerator for System.Xml.Document.

Note

To explore all the type accelerators in Windows PowerShell, use the following code:

[psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::get

Let's take a look at the basic structure of an XML document:

<?xml version="1.0" encoding="utf-8"?>
<Custom>
<Computers>
  <Manufacturers>Fujitsu</Manufacturers>
  <Model>Lifebook S 700 Series</Model>
</Computers>
<Computers&gt...
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