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

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


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL