Coder Social home page Coder Social logo

wifiprofilemanagement's People

Contributors

andrewtchilds avatar jcwalker avatar mkht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wifiprofilemanagement's Issues

Source for ProfileName

Get-WiFiProfile and Get-WifiAvailableNetwork return a ProfileName. I'd like to understand how this corresponds to other similar names. I have attached a screenshot to illustrate my questions.

  1. Is ProfileName the same as the name in the Windows Settings->Wi-Fi dialog list?
  2. Will ProfileName always exactly match the WiFi network's SSID as reported by Get-WifiAvailableNetwork, assuming the WiFi network is available?
  3. How can I correlate a network in Get-WiFiAvailableNetwork with an active connection? In the screenshot below, how do I know whether WiFi profile lep22pard or gal47lows is active on InterfaceIndex 9? In this case lep22pard is on 5 GHz and gal47lows is on 2.4 GHz from the same AP.

Originally I thought the WiFi ProfileName corresponded to the Windows network name in Get-NetConnectionProfile and the control panel, but I see that is not always the case, as with "leppard 2" in the screenshot.

wifi-names-hilite

Error when using Remove-WiFiProfile

Using command:

Remove-WiFiProfile -ProfileName <SSID>

Return code: -37104

Remove-WiFiProfile : Exception calling "ShouldProcess" with "1" argument(s): "Windows PowerShell is in NonInteractive
mode. Read and Prompt functionality is not available."
At C:\WINDOWS\AdminArsenal\PDQInventoryRemoteCommand\service-1\exec\command.ps1:3 char:1

  • Remove-WiFiProfile -ProfileName
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-WiFiProfile
    

Another Issue with Wi-Fi interface not found on the system

I'm experiencing a similar issue that was described in #31 but I'm not having any WMI issues. Is this a bug? I appreciate any help!

PS C:\> New-WiFiProfile -ProfileName $ssid -ConnectionMode auto -Authentication WPA2PSK -Encryption AES -Password $ssid_psk
New-WiFiProfile : Wi-Fi interface not found on the system.
At line:1 char:1
+ New-WiFiProfile -ProfileName $ssid -ConnectionMode auto -Authenticati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-WiFiProfile

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.2364
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.2364
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Local Area Connection 2   Viscosity Virtual Adapter V9.1               16 Not Present  00-FF-BE-8A-AB-32          0 bps
Wireless Network Conne... Intel(R) Dual Band Wireless-AC 3165          15 Up           E0-94-67-A7-F6-20      72.2 Mbps
Local Area Connection     Intel(R) Ethernet Connection I219-V          11 Disconnected 50-7B-9D-95-00-A7          0 bps
Local Area Connection 3   Viscosity Virtual Adapter V9.1 #2             8 Not Present  00-FF-69-65-94-58          0 bps
Bluetooth Network Conn... Bluetooth Device (Personal Area Netw...       6 Disconnected E0-94-67-A7-F6-24         3 Mbps

Get-NetAdapter -Name 'Wireless Network Connection' | fl

Name                       : Wireless Network Connection
InterfaceDescription       : Intel(R) Dual Band Wireless-AC 3165
InterfaceIndex             : 15
MacAddress                 : E0-94-67-A7-F6-20
MediaType                  : Native 802.11
PhysicalMediaType          : Native 802.11
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Mbps)            : 72.2
MediaConnectionState       : Connected
ConnectorPresent           : True
DriverInformation          : Driver Date 2022-02-20 Version 19.51.40.1 NDIS 6.60

Show connected network

Would it be possible make a command0 that showed which wifi-network you were connected to? Something like Get-WifiConnectedProfile or Get-WifiConnection?

Return Value / Error on Remove-WifiProfile

Looking to retrieve a value based on whether a WifiProfile was successfully removed or their was an error. For instance if the Profile did not exist I want to have it return an error. I'm not seeing any way in the documentation to access this information currently.

Example would be:

try { Remove-WifiProfile -ProfileName $WifiProfile } catch { Write-Host ("Profile does not exist. Please enter Wifi Profile again.") $WifiProfile = Read-Host ("Wifi Profile") }

Enumerate all WiFi interfaces by default

I've got a few machines that have default WiFi adapters not called 'Wi-Fi' which can't be renamed (no idea why).

I can put together a PR to change this modules behavior so that anytime it currently relies on defaulting to WiFiAdapterName='WiFi' it instead enumerates and uses all WiFi adapters. This would mean the exported functions would "just work" with non standard adapter names and multiple adapters without having to remember to pass the WiFiAdapterName parameter.

The https://msdn.microsoft.com/en-us/library/windows/desktop/ms706716(v=vs.85).aspx API should provide what I need.

If I put a PR together to do this would it be accepted (in principal)?

Thanks

Unable to load available wifi networks on custom named adapters

PS C:\Users\username> Install-Module -Name wifiprofilemanagement                                                                                                                                                                               Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PS C:\Users\username> Get-WiFiAvailableNetwork
Get-WiFiInterfaceGuid : Wi-Fi interface not found on the system.
At C:\Program Files\WindowsPowerShell\Modules\wifiprofilemanagement\0.5.0.0\WiFiProfileManagement.psm1:112 char:22
+ ... rfaceGUID = Get-WiFiInterfaceGuid -WiFiAdapterName $WiFiAdapterName - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-WiFiInterfaceGuid

my network adapter was renamed from the default to wlan0.

Does not work in Windows 7 SP1

I just wanted to send you a note. You can close this issue.

I updated to PowerShell 5.0. But Get-NetAdapter only appears on Windows 8 and later.

PS C:\Users\michaelmie> get-wifiprofile
Get-NetAdapter : The term 'Get-NetAdapter' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At C:\Users\michaelmie\Documents\WindowsPowerShell\Modules\WiFiProfileManagement\WiFiProfileManagement.psm1:195 char:40
/+ [System.Guid]$interfaceGUID = (Get-NetAdapter -Name $WiFiAdap ...
/+ ~~~~~~~~~~~~~~
/+ CategoryInfo : ObjectNotFound: (Get-NetAdapter:String) [], CommandNotFoundException
/+ FullyQualifiedErrorId : CommandNotFoundException

Error opening WiFi handle.
At C:\Users\michaelmie\Documents\WindowsPowerShell\Modules\WiFiProfileManagement\WiFiProfileManagement.psm1:26 char:9
/+ throw $($Script:localizedData.ErrorOpeningHandle)
/+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/+ CategoryInfo : OperationStopped: (Error opening WiFi handle.:String) [], RuntimeException
/+ FullyQualifiedErrorId : Error opening WiFi handle.

Mike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.