WMI NET Primer

WMI scripting library to create an array of useful Windows system administration scripts

What is WMI (Windows Management Instrumentation)?
WMI is the core management-enabling technology built into Windows 2000, Windows XP, and the Windows Server 2003 family of operating systems.

Systems Management: You can write scripts to manage event logs, file systems, retrieve performance data, registry settings, scheduler, security, printers, processes, services, shares, and various other operating system components and configuration settings.
Network management.
Real-time health monitoring.
Windows .NET Enterprise Server management

Above tasks written in VBscript, but there can be done in powershell script. Almost everything for server can be done in PowerShell,
As an administrator you may not have the programming knowledge or the time to learn PowerShell. We will assist you building your PowerShell cmdlets to help you better manage your Servers and PCs.


Type in:


PS C:\> [System.Math]::Pow(2, 3)

Copy and Try it

Look at the sytax..

What you have done is input the System.Math namespace and called the static method Pow().
Get used to the syntax; you will be using it again and again. Square brackets ‘[]' around the fully qualified type name and two colons ‘::' indicate I am calling the static method. Let us another example, create a variable, set it to a string and then inspect its type. You may be familiar with the GetType() method from C#.


PS C:\> $abc = "Hello"
PS C:\> $abc.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object

Copy and Try it

Set the variable $abc to a string, it is by using the GetType() method. This is becomes handy when running, tracing and debugging PowerShell scripts. You can find out exactly what type it is.