Now that we know how to create and update type data, the next step for us is to learn how to remove the type data. Removing the type data requires us to get the type data first. In this recipe, we will learn about the process of removing type data, whether it was updated using cmdlets or an XML file.
Removing custom type data
How to do it...
The first step is to understand that a cmdlet can output one or more types of objects. For instance, in our case, Get-ChildItem will output System.IO.DirectoryInfo, as well as System.IO.FileInfo. Let's learn how to work with these:
- Get the type of the object returned by the cmdlet:
PS> Get-ChildItem | Get-Member | Select-Object TypeName -Unique
- Two types are returned. We created...