Retaining object modifications across sessions

In the previous recipe, Understanding extension of Type Data, we used the Update-TypeData cmdlet to add members. However, we said that the update was valid as long as the session was. Now, there could be two ways by which to make the type data stick across sessions:

  1. Using the PowerShell profile.
  2. Using an XML file

PowerShell profile is straightforward. However, usually, the type data extension and formatting rules are packaged as part of PowerShell modules. And adding code to the profile is not particularly helpful in that case. In this recipe, we will write a simple XML (.ps1xml) file that we will load in order to extend the type data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.63.87