locked
Combobox display issue RRS feed

  • Question

  • **my account hasn't been verified, that's why I can't post screen shots

    Hello,

    I created a GUI combobox using the below code and it is populated by SCCM information being pulled by line 1. 

    -

    -

    -

    $applist = @(Get-CimInstance -ClassName CCM_Application -Namespace "root\ccm\clientSDK") | select-object name
    $comboBox1.FormattingEnabled = $true
    $comboBox1.Location = (New-Object -TypeName System.Drawing.Point -ArgumentList @([System.Int32]12,[System.Int32]87))
    $comboBox1.Name = [System.String]'comboBox1'
    $comboBox1.Size = (New-Object -TypeName System.Drawing.Size -ArgumentList @([System.Int32]471,[System.Int32]30))
    $comboBox1.TabIndex = [System.Int32]0
    foreach($app in $applist)
    {
      $comboBox1.Items.add($app)
    }

    -

    -

    -

    When I pipe the variable into Select-Object Name, the Combobox displays the information as seen below:

    -

    -

    -

    @{name=Local Administrator Password Solution for Clients}
    @{name=DLP Agent x64 15.0.0100.01063}
    @{name=Google Chrome}

    -

    -

    -

    How do I remove the "@{Name=}" and just keep the application name, like:

    -

    -

    -

    Local Administrator Password Solution for Clients
    DLP Agent x64 15.0.0100.01063
    Google Chrome





    • Edited by Leroy02 Friday, June 21, 2019 2:09 AM edit
    Friday, June 21, 2019 2:06 AM

All replies

  • Nevermind,

    Forgot to add -ExpandProperty name after select-object name

    Friday, June 21, 2019 2:32 AM