Automation-as-a-Commodity
Show MenuHide Menu

Tag: WMI

How To Reset A Wireless Network Adapter? #PowerShell

March 15, 2009

I switch between wireless networks frequently. Usually I am facing issues with getting connected which get resolved by clicking around in Vista’s Network and Sharing Center. As this takes always a couple of minutes I want a PowerShell script that I can use to reset my wireless lan adapter directly.

This can be accomplished using WMI:

How To Map A Network Printer? #PowerShell

July 14, 2008

If you want to add a network printer connection with PowerShell try one of the following ways:

Printui.dll Call

Use WshNetwork’s AddWindowsPrinterConnection method

Use WMI Win32_Printer’s AddPrinterConnection method

How To Retrieve The UUID/GUID From A Computer? #VBScript

August 28, 2006

The VBScript function below, GetUUID, shows how to retrieve the UUID/GUID from a computer.

How To Determine The Name Of The Local Administrator Group? #VBScript

January 17, 2006

The VBScript below, LocalAdminGroup.vbs, determines the name of the local administrator group by searching its SID in the list of local groups.

See also: Well-known security identifiers in Windows operating systems

How To Test WMI Connectivity? #VBScript

September 10, 2005

The VBScript file below, WMIPing.vbs, checks if connection to WMI of the target system can be established.

WMIPing.vbs exits with an errorlevel:

  • 0 = WMI Ping succeeded successfully
  • 1 = ICMP Ping failed, WMI Ping omitted
  • 2 = WMI Ping failed