"Kiron" <Kiron@xxxxxx> wrote in message
news:C99C483B-83A0-4D3D-8243-69A2DB51ED89@xxxxxx
>> ...add a chunk of xml code to the file
>> C:\WINDOWS\system32\WindowsPowerShell\v1.0\types.ps1xml >
> 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.
--
Jon