|
Hi, I am trying to make this to work for Windows 10 but no luck so far. We are using Lenovo laptop. Lenovo no longer have the access connection apps for Win10 so I am trying to look at an alternative. Is that something you can help? Thanks for your time.
Hello can this script be changed in a way to detect a disabled wifi adaptor and re-enable it using system account for all user's profile? the issue we have with our laptops is that wifi adaptor disable itself, therefore our remote users have to call our support to help then re-enabling it. thanks
Hello, Does the script require admin rights when executed the first time i.e. when switching from wireless to wired. I'm asking because I was prompted by UAC to enter admin credentials but this only the first time. Best regards, Kevin
Hi, this is great but I propose three changes: 1. Check for Version >=8 as number not text, currently it will not use the Win8 syntax on Windows 10. 2. Event triggers instead of startup: event id 27 and 32 from SYSTEM are pretty good indications for network changes and that also means the script doesn't have to run forever, which it will not. Doing eventid natively in PS is pretty cumbersome, as there is no eventid-trigger from logs to add. 3. With the trigger, the loop can be removed. I've done all that manually (for system) and so far it works. -Roland
Roland could you plese provide modified script or short explanation how to do this?
What and where to add the script to after LAN_off+Wlan_On and Wlan_off+LAN_ON was restart the OpenVPN service (OpenVPNService)?
The default condition for the task scheduler is to stop the running task after 3 days. If a user doesn't reboot their machine within three days, doesn't this get in the way of the process working?
To work with things like VPN (Cisco and Fortinet) and HyperV, update these two lines in the .psm1 file. $NetworkConnectionsLAN = Get-WmiObject -Class Win32_NetworkAd apterConfigurat ion -Filter "IPEnabled=TRUE " | Where-Object {($_.Descriptio n -notlike "*VirtualBox*") -and ($_.Description -notlike "Hyper-V Virtual*") -and ($_.Description -notlike "Cisco AnyConnect*") -and ($_.Description -notlike "*VPN*") -and ($_.Description -notlike "*VMware*") -and ($_.Description -notlike "*Wireless*") -and ($_.Description -notlike "*WiFi*") -and ($_.Description -notlike "*Wi-Fi*")} $NetworkConnect ionsWLAN = Get-WmiObject -Class Win32_NetworkAd apterConfigurat ion -Filter "IPEnabled=TRUE " | Where-Object {($_.Descriptio n -notlike "*VirtualBox*") -and ($_.Description -notlike "Hyper-V Virtual*") -and ($_.Description -notlike "*VMware*") -and ($_.Description -notlike "Cisco AnyConnect*") -and ($_.Description -notlike "*VPN*") -and (($_.Descriptio n -like "*Wireless*") -or ($_.Description -like "*WiFi*") -or ($_.Description -like "*Wi-Fi*"))}
Please help, I don't not where to add this line to exclude VPN: -and ($_.Description -notlike "Cisco AnyConnect VPN Client Connection" Other than VPN it works great. Thanks, Kevin
Everything appears fine until Get-ScheduledTask : No MSFT_ScheduledT ask objects found with property 'TaskName' equal to 'WLAN Manager'. Verify the value of the property and retry. At C:\temp\Install -WLANManager-ma ster\PSModule-W LANManager.psm1 :411 char:18 + ... If ((Get-Scheduled Task -TaskName "$TaskName" -ErrorAction Cont ... + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (WLAN Manager:String) [Get-ScheduledT ask], CimJobException + FullyQualifiedE rrorId : CmdletizationQu ery_NotFound_Ta skName,Get-Sche duledTask IT isn't creating the scheduled task and doesn't copy the files either