create nic teaming

I want to write script for creating NIC Teaming on Windows 2012. Command for creating teaming is like “new-netlbfoteam -Name Name -teammember -teamingmode some mode here”. How can i get adapters name for this command? i try to use this: $adap=get-networkadapter | select-object Name, then $adap -join “,”. And result of this is like “,”. why?

Get-networkadapter doesn’t exist on Server 2012

I think you want this

$adap=get-netadapter | select-object -ExpandProperty Name
$adap -join “,”

oh, sure get-netadapter. i mistaked in this post, but used get-netadapter of course. thank you for help, but i solved this problem by mysel and created this with quotes by the next command (get-netadapter -Physical | select-object Name | select-string -notmatch "---") -join "," -replace '}', '"' -replace '@{Name=', '"'. But the finally solution is very simple new-netlbfoteam -name team -teammembers (Get-NetAdapter -Physical).name -TeamingMode SwitchIndependent -Confirm:$false