Separate items in array with comma


good day guys, i'm trying separate items in array comma can't work.

i've been trying before array of ips, hotfix ids.

please me this. in advance!

$patch = get-wmiobject win32_quickfixengineering -computername "server1" | sort-object installedon -descending| select-object -first 5

$hotfixid = $null

$patch.hotfixid | % { $hotfixid += $_ } 

$hotfixid -join ","

i keep getting  results this, same ips. kb3135445kb3134214kb3133043kb3127220kb3126593


use

$hotfixid = @()

instead of assigning $null, make array.

richard mueller - mvp enterprise mobility (identity , access)



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...