Find if the wireless adapter is enabled on all systems

Hi All,
Find if the wireless adapter is enabled on all systems
I want help with a script with which i can scan a set of systems and know if the Wireless is enabled or disabled

This will help me target on which systems i need to enable via Bios.
Windows 7 systems
Thanks
mtthompsonsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

luconstaCommented:
You could try this, assuming the "computerlist.txt" file contains one computer name on each line, for example:

computer1
computer2
...
computerN

$computers = Get-Content C:\ps\computerlist.txt
get-wmiobject -cn $computers -class win32_networkadapter | where name -like "*wi*" | fl -Property PSComputerName,Name,MACAddress

Open in new window


You will have a formatted list with computer name and the adapter that will have the "*wi*" string in its name (most of the wireless adapter will have a name like Wireless/WiFi,etc.)
0
mtthompsonsAuthor Commented:
Is this a powershell script? Hopefull

PS C:\Windows\system32> $computers = Get-Content d:\computerlist.txt
PS C:\Windows\system32> get-wmiobject -cn $computers -class win32_networkadapter
 | where name -like "*wi*" | fl -Property PSComputerName,Name,MACAddress
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "name"
value of type "System.String" to type "System.Management.Automation.ScriptBlock
".
At line:1 char:65
+ get-wmiobject -cn $computers -class win32_networkadapter | where <<<<  name -
like "*wi*" | fl -Property PSComputerName,Name,MACAddress
    + CategoryInfo          : InvalidArgument: (:) [Where-Object], ParameterBi
   ndingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerSh
   ell.Commands.WhereObjectCommand
0
luconstaCommented:
Sorry, my mistake - I forgot to mention that is PowerShell

try this one instead:

$computers = Get-Content C:\ps\computerlist.txt
get-wmiobject -cn $computers -class win32_networkadapter | where-object {$_.name -like "*wi*"} | fl -Property PSComputerName,Name,MACAddress

Open in new window

0
mtthompsonsAuthor Commented:
Sorry for the delay
I just placed 1 system name thats my own system and tried

PS C:\> $computers = Get-Content d:\computerlist.txt
PS C:\> get-wmiobject -cn $computers -class win32_networkadapter | where-object
{$_.name -like "*wi*"} | fl -Property PSComputerName,Name,MACAddress
PS C:\>


No results
Can i have results to a file
0
luconstaCommented:
Hmmm, may be a problem with your WMI?...

Try using only the following command in PS , just to see if your WMI is working properly:

get-wmiobject -class win32_networkadapter

It should return all your local PC network adapters.

If still doesn't working see this article WMI Troubleshooting and eventually use the WMI Diagnosis Utility provided there to check if there are any WMI problems.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.