You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$index=Read-Host"Index value of NIC to disable, Ctrl+C to cancel"
$wmi=Get-WMIObject-Class Win32_NetworkAdapter -filter "Index LIKE $index"-ComputerName $Hits[$selection] -Credential $Credential
Write-Host"Processing. You may see a failed RPC call message appear if this is the only NIC with an actual network connection. That indicates the machine wasn't available to return a status message and thus was successful."
$index=Read-Host"Index value of NIC to disable on $Computer, Ctrl+C to cancel"
$wmi=Get-WMIObject-Class Win32_NetworkAdapter -filter "Index LIKE $index"-ComputerName $Hits[0] -Credential $Credential
Write-Host"Processing. You may see a failed RPC call message appear if this is the only NIC with an actual network connection. That indicates the machine wasn't available to return a status message and thus was successful."
$wmi.disable()
Write-Host"Disabled!"
}
Else { Write-Host"Not logged on to any machine searched for." }