PowerShell Live - being retired

Please go to http://www.shelltools.net for more information

Welcome to PowerShell Live - being retired Sign in | Join | Help
Home Main Site Blogs Forums Videos Chat Customer Support

Re: Newbie help with output

  •  04-12-2007, 8:26 PM

    Re: Newbie help with output

    looks like you are on the right track..

     get-content is great like that , how an item on each line can be splitout and used in the pipeline like that.. also i look into import-csv as it can read in multicolumn excel sheets saved as csv so you could do (if the column name for the server is called server)

    import-csv c:\myservers.csv | foreach { Get-WmiObject win32_osrecoveryconfiguration -computername $_.server | Format-Table __server, name }

      also look at Select-object, this is very great working with WMI objects, because you can see all the properties associated with it, then choose

     i.e

     Get-WmiObject win32_osrecoveryconfiguration |Select-Object *

    i.e then you can choose which properties you want

    Get-WmiObject win32_osrecoveryconfiguration |Select-Object __server, name, debugfilepath

    Have a greats day.

    Filed under:
View Complete Thread