This project is read-only.

This Powershell script helps IT support specialists to find out why a client computer is not able to connect to the enterprise wireless infrastructure.


To run in your Active Directory, the code need to be customized - Functions which need to be customized are especially mentioned. - For most of the tests, the LAN cable need to be connected!

The environment for which this script was prepared roughly looks as follows:
  • A PKI was setup containing one OfflineRootCA and one online Active Directory integrated Subordinated CA.
  • Based on the computer certificate template a template for wireless computers was created, containing a unique OID for identification and verification.
  • To enroll the certificate automatically to the computer, the computer account must be member of an Active Directory group which has popper permissions on the template.
  • The CRL is published on an internal webserver and can be found in the proper section of the wireless certificate.
  • The Subject Alternative Name reflects the client computer name.


The following tests will be performed:
  • Checking if client Operating System is at least Windows 7
  • Check if computer was rebooted in the last 10 hours
  • Checking Event log for most frequent problems
  • Checking Windows Registry
  • Checking computer certificate
  • Checking computer certificate chain
  • Checking some basic WLAN profile settings
  • Performing WLAN Adapter basic testing
  • Performing LAN Adapter basic testing
  • Performing basic network tests
  • Checking Operating System time accuracy
  • Checking certificate revocation status
  • The results will be displayed directly in the command window.

toolA.png
toolB.png
(To simulate a not working wireless connection, the WLAN adapter has been turned off in the screenshot above.)


You can use the script also to see examples how to do to the following things with Powershell and Windows command line tools:
  • Use hash tables to return more than one value from a function
  • Use usual and .net regular expressions
  • Run command line programs and interpreting the result
  • Use WMI to read IP configuration of the computer
  • Checking a windows service state and trying to start it
  • Downloading a file
  • Working with Error Variables for Error handling
  • Working with try & catch for exception handling
  • Checking for specific events in the windows event log
  • Checking the local certificate store
  • Checking the installed certificate if it matches the requirement
  • Checking if the certificate has been revoked
  • Checking the WLAN profile for basic key values
  • Test connectivity to another computer in the network
  • Check if name resolution works
  • Check if the computer account is member of a particular group
  • Check if the computer account has been activated
  • Check if the computer is trusting the domain
  • Checking values in the Registry
  • Checking if the computer has been rebooted in the last few hours

Last edited Jul 14, 2014 at 6:53 AM by Juanito99, version 16