Problem: WMI StdRegProv Class can return junk characters when using the GetStringValue on windows 2003/XP/Vista and Windows 2008

Under a specific set of conditions, the StdRegProv GetStringValue method will return  a string of data from a random memory location.   The string value must have been created and valid data written into the key name.  Once the key name is cleared to a zero length, all subsequent reads will return the invalid data. To…

0

Using Powershell cmdLet “Compare-Object” to compare WMI objects

Recently I came across a scenario where one of the developers wanted to automate to produce a list of Products that are not installed on a box, compared to a reference server. He was looking for a  powershell solution for the same. If you are familiar with WMI, you may obviously want to explore the…

0

How to get the Terminal Service Account settings and Client Settings from the Terminal Server

You can use Win32_TSAccount And Win32_TSClientSetting WMI class to get the information but these classes returns some information in bit-wise operator and that needs to be convert in simple terms which are easily understandable to the user. Most of such scripts are used by the administrators in big organization and its really tough for them…

1

Reading all WINS IP addresses on a computer using Windows Scripting Host ( VBScript )

I recently worked with a developer who was working on a VBScript to enumerate all Windows Internet Name Service (WINS) IP addresses of a computer using the Win32_NetworkAdapterConfiguration WMI class. The developer was only able to enumerate the first two WINS IP addresses of a computer. The Win32_NetworkAdapterConfiguration class uses two properties to read WINS…

1

Retrieving product installation information using WMI via Powershell on a remote machine

The WMI class Win32_product can be used to obtain a list of all the products installed on a remote machine. Below is a PowerShell example of how to use the Win32_Product class to retrieve product information from a remote machine: Get-WmiObject -Class Win32_Product -ComputerName “remotecomputer” | Select-Object __Server , Name , Version , RegCompany ,…

2

How to get LogonID without accessing the network (cached logon) using WMI

Summary This article describes a method to get UserName and LogonID without accessing the network i.e. for LogonType=11  Here is the link to find different Logon types (Win32_LogonSession Class ):   http://msdn.microsoft.com/en-us/library/aa394189.aspx Symptoms 1. Logon to PC without network connection. (cached logon) 2. Run the following query in wbemtest or in a script :  …

0