I made this script in order to automate the process of Installing BACS Driver and configuring them with a single “click” via powershell.
You have to configure the array @bcg_config which contains the configuration file to import with basccli. And you also have to pass as argument the IP that you want assign to the machine you are configuring.
Also, you can test te connectivity configuring the ip of the gateway and one internet ip (i used 8.8.8.8 and is google dns).
Param([Parameter(Mandatory=$true,ValueFromPipeline=$true)] [String]$IP_Addr ) #Dichiaro tutte le variabili $conf_ip = "ip: "+$IP_Addr $PI_Directory = "c:\POSTINSTALL\" $bcg_file = "team.bcg" $Bacs_Setup = "c:\POSTINSTALL\Bacs.exe /s /v/qn" $Bacs_CliImportConfig = "C:\Program Files\Broadcom\BACS\BACScli.exe" $Bacs_Command = "`"restore $PI_Directory$bcg_file`"" $Bacs_CliImportConfig_Args = @("-t", "team",$Bacs_Command) $bcg_config = @("name: internal", "type: 2", "pnic: 01:00.0", "pnic: 01:00.1", "vname: [vlan_name]", "vid: [vlan_id]", $conf_ip, "smask: x.x.x.x", "gw: x.x.x.x", "dns: x.x.x.x", "dns: x.x.x.x", "vname: [vlan_name]", "vid: [vlan_id]", "", "name: user", "type: 1", "pnic: 02:00.0", "pnic: 02:00.1") if (-not (Test-Path $PI_Directory)) { Write-Host -ForegroundColor Red "POSTINSTALL Directory doesn't exists. I quit!" exit } New-Item $PI_Directory$bcg_file -type file -force $bcg_config Start-Process -Wait $Bacs_Setup $bcg_config | Out-File $PI_Directory$bcg_file -append Start-Process -Wait $Bacs_CliImportConfig Write-Host "Starting Connectivity Test..." $Internet_IP = "8.8.8.8" $Private_IP = "[gateway_IP]" $Test_Internet_Ping = Get-WmiObject Win32_PingStatus -f "Address='$Internet_IP'" $Test_Private_Ping = Get-WmiObject Win32_PingStatus -f "Address='$Private_IP'" if ($Test_Private_Ping.StatusCode -ne 0) { Write-Host -ForegroundColor Red "NET_GW_KO: " $Private_IP } else { Write-Host -ForegroundColor Green "NET_GW_OK: " $Private_IP } if ($Test_Internet_Ping.StatusCode -ne 0) { Write-Host -ForegroundColor Red "NET_INTERNET_KO: " $Internet_IP } else { Write-Host -ForegroundColor Green "NET_INTERNET_OK: " $Internet_IP }