Is it possible to set the output format in Custom CmdLet
hi,
i have custom cmdlet developed in c#. when writeobject(<the object>), prints properties 1 after in powershell window. want print in tabular format.
i know can if in powershell command use <cmdletname> | format-table.
what want know is possible me make appear in tabular format default (not using |format-table).
thanks...
girija shankar
i have custom cmdlet developed in c#. when writeobject(<the object>), prints properties 1 after in powershell window. want print in tabular format.
i know can if in powershell command use <cmdletname> | format-table.
what want know is possible me make appear in tabular format default (not using |format-table).
thanks...
girija shankar
it possible. need create format file (xml) , load it to current session with the update-formatdata cmdlet. more information, type in console:
ps > get-help about_format.ps1xml
the online version can found here:
http://technet.microsoft.com/en-us/library/dd315396.aspx
shay levy [mvp]
http://blogs.microsoft.co.il/blogs/scriptfanatic
powershell toolbar
ps > get-help about_format.ps1xml
the online version can found here:
http://technet.microsoft.com/en-us/library/dd315396.aspx
shay levy [mvp]
http://blogs.microsoft.co.il/blogs/scriptfanatic
powershell toolbar
Windows Server > Windows PowerShell
Comments
Post a Comment