Tady jsem ti udelal rychlej ovladaci panel :
function WIFI_MENU
{
param (
[string]$Title = 'Wi-Fi control panel'
)
Clear-Host
Write-Host "••••• $Title •••••" -ForegroundColor green
# Menu vyber
Write-Host "[1] Volba '1' → Wi-Fi [ON]"
Write-Host "[2] Volba '2' → Wi-Fi [OFF]."
Write-Host "* Stiskni 'Q' pro ukonceni *" -ForegroundColor red
}
do
{
WIFI_MENU
$selection = Read-Host "`r`n Vyberte volbu "
switch ($selection)
{
'1' {
Enable-NetAdapter -Name "Wi-Fi" -Confirm:$false
#WiFi zapnout
} '2' {
Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false
#WiFi vypnout
}
}
pause
}
until ($selection -eq 'q')
PS: V CMD vypisuje co ?
Kdyz se podivas v tom "Get-NetAdapter" tak by jsi ho mel videt aktivovany, jestli je vyply na HW urovni, musi byt povolen, treba pres spravce zarizeni nebo v "Control panel" → "Network" → pravy klik mysi : "ENABLE".