locked
Export Get-wmiobject to csv RRS feed

  • Question

  • I already have a script that uses the get-uninstall applications and exports to a CSV. I was wondering how to do the same thing using the get-wmiobject "addRemovePrograms" comandlet?

    get-wmiobject -class Win32Reg_AddRemovePrograms
    Select-Object DisplayName, Publisher, InstallDate, Version, UninstallString |
        Sort-Object DisplayName | Export-Csv "c:\Programs.csv" -notypeinformation


    DHeinz

    Tuesday, August 28, 2018 12:35 PM

Answers

  • You already wrote that! Just missing a pipe after '-class Win32Reg_AddRemovePrograms'

    Get-WmiObject -class Win32Reg_AddRemovePrograms |
        Select-Object DisplayName, Publisher, InstallDate, Version, UninstallString |
        Sort-Object DisplayName | 
        Export-Csv "c:\Programs.csv" -NoTypeInformation

    • Marked as answer by DRHeinz Tuesday, August 28, 2018 3:31 PM
    Tuesday, August 28, 2018 12:49 PM

All replies

  • You already wrote that! Just missing a pipe after '-class Win32Reg_AddRemovePrograms'

    Get-WmiObject -class Win32Reg_AddRemovePrograms |
        Select-Object DisplayName, Publisher, InstallDate, Version, UninstallString |
        Sort-Object DisplayName | 
        Export-Csv "c:\Programs.csv" -NoTypeInformation

    • Marked as answer by DRHeinz Tuesday, August 28, 2018 3:31 PM
    Tuesday, August 28, 2018 12:49 PM
  • Thanks John :)

    DHeinz

    Tuesday, August 28, 2018 3:31 PM