I am finally getting around to creating formatting (ps1xml) for the output of my functions. I have one function that returns objects of type Microsoft.ActiveDirectory.Management.ADGroup. I would like to have the default output for this function to still be an ADGroup object (so I don’t want to change the TypeName). But I want to format the output for this function differently than the default (format-table instead of format-list).
I know that formatting in the script with a format-table makes the output not be an ADGroup any more (and is bad practice anyway). I could run the function and pipe it into format-table to get what I want, but would like to have a different default output format so I don’t have to remember to do that each time.