create nic teaming

This topic contains 2 replies, has 2 voices, and was last updated by  ÐÐ¸ÐºÐ¾Ð»Ð°Ð¹ Куликов 4 years, 1 month ago.

  • Author
    Posts
  • #10559

    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?

  • #10567

    Richard Siddaway
    Moderator

    Get-networkadapter doesn't exist on Server 2012

    I think you want this

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

  • #10574

    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`

You must be logged in to reply to this topic.