Powershell – Network Adapter Enable, Disable

Buy Xanax 1Mg Online Uk WmiObject 를 이용하여 네트워크 장치(랜카드, NIC)를 활성화, 비 활성화 시킨다.

https://modaypadel.com/ilpvv1s 핵심은 win32_networkadapter WmiObject 를 이용하여 해당 Network Adapter Object를 추출한뒤 .Enable() .Disable() 메서드를 호출 하는 것이다.

Set-NetworkAdapterStatus.ps1

$Adapters = gwmi win32_networkadapter | ?{$_.PhysicalAdapter} $Adapters | select index, name, NetEnabled | Format-Table -AutoSize [int]$SelectedIndex = Read-Host "Select Network Adapter index " $SelectedAdapter = $Adapters | ?{$_.index -eq $SelectedIndex} if ($SelectedAdapter -eq $null) { Write-Error "Wrong index" return } $SelectedAdapter | select Name, NetEnabled | Format-Table -AutoSize Write-Host "1: Enable" Write-Host "2: Disable" [int]$Status = Read-Host "Select Status " if ($Status -eq 2) { $SelectedAdapter.Disable() } elseif ($Status -eq 1) { $SelectedAdapter.Enable() }

답글 남기기

https://manabernardes.com/2024/jx618f1t6b 이메일 주소는 공개되지 않습니다.

https://space1026.com/2024/01/37yvzsc0co

Cheap Xanax Fast Delivery You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

https://masterfacilitator.com/wbwcsyczsi

http://www.wowogallery.com/t3h4gz5

https://fireheartmusic.com/u25olxianw

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.