I am trying to use the below function and export csv list of computers with information like LoginID, Displayname, Computername, Last Boot time and TIme since last reboot. I found this function on the internet it works fine and I get the output as shown below, if I run it on individual computer, however I am not able to export-csv in proper format.Please help me for the same.

Well, you're loading all your data into a hashtable, then trying to output that as an object. Why not just output the object directly and bypass the middleman? First I'd move Import-Module inside your function, and define the object in a Begin block: