"Kiron" <Kiron@xxxxxx> wrote in message
>> ...add a chunk of xml code to the file
> It's better/safer to create a new ps1xml file and extend the type through
> the Update-TypeData Cmdlet.
Yep, you're right - that's a better way of doing it. Keeping it in a
separate file also allows you to easily see what changes have been made,
should you wish to reverse them (please excuse the pun).
I tried doing something similar before, by adding a types.ps1xml in a
directory included in path environment variable, thinking that it would be
picked up automatically. It wasn't. So I suppose you need to explicitly add
it using Update-TypeData
Good tip. Thanks Kiron.