Home arrow Howto's arrow Howto - Scripting
Home
Tools
Knowledge Center
Howto's
Latest Jobs
Latest jobs from IT Contractor Jobs
The latest jobs registered on the IT Contractor Jobs web site.
  • Test Analyst

    - Test Analyst (New Zealand, Auckland - Auckland CBD)

    Test Analyst - Contract A software test Engineer is required for a 6 month contract. Working in the Finance sector and for a...

  • Test Analyst

    - Test Analyst (New Zealand, Auckland - Auckland CBD)

    Test Analyst - Contract A software test Engineer is required for a 6 month contract. Working in the Finance sector and for a high...

  • Senior Infrustructure Engineer

    - Senior Infrustructure Engineer (New Zealand, Wellington - Wellington CBD)

    Senior Infrustructure Engineer - Hourly Rate Contract   I require an experienced Infrastructure Engineer to work in a technological environment that is constantly...


Howto - Scripting
Improving Upon Microsoft's Daylight Saving Time Patch PDF Print E-mail
Like the original scripts, the new scripts work on all the Windows platforms mentioned in the article. However, with the new scripts, machines that have been updated once don't need to be updated again if the users move to a different time zone. All the users need to do is to select the new time zone in the machine's Date and Time Properties dialog box and they're covered.
Read more...
 
Practical Scripting Part 14: Learning More about WMI Scripting PDF Print E-mail

By now if you've been patiently following along with me through the previous thirteen articles in this series, you should have gained some basic confidence in writing WMI scripts to manage various aspects of Windows-based networks.

Obviously though we're just getting started learning to script. There's tons more you can do with WMI and I could go on writing articles like these until hell freezes over (or perhaps until earth warms due to global warming, that is, depending on your take on the subject). But my goal with this series of articles was basically just to get you up and running by showing you some basics, and now in this final article I want to mention some useful resources you can use to learn more about WMI scripting on your own.

So anyway, let's take a quick look at where you can go from here to learn more about how to script using WMI.

Read more...
 
Practical Scripting Part 12: Properties of a WMI Class PDF Print E-mail

Back in the third article in this series, we developed the following simple script named displayTimeZone.vbs that displays the current time zone setting on your machine:

Option Explicit
On Error Resume Next
Dim strComputer
Dim strWMINamespace
Dim strWMIQuery
Dim objWMIService
Dim colItems
Dim objItem

strComputer = "."
strWMINamespace = "\root\CIMV2"
strWMIQuery = "SELECT * FROM Win32_TimeZone"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & strWMINamespace)
Set colItems = objWMIService.ExecQuery(strWMIQuery)

For Each objItem In colItems
            WScript.Echo objItem.Caption
Next

When I run this script, I get the following result:

C:\scripts>DisplayTimeZone.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

(GMT-06:00) Central Time (US & Canada)

How did I know that it was the Caption property of the Win32_TimeZone class that contains the information I want to display? By reading the description of the Win32_TimeZone WMI class on MSDN. In fact, this MSDN page tells us that the Description property basically returns the same information as the Caption property, so I could have changed the line WScript.Echo objItem.Caption to WScript.Echo objItem.Description and gotten the same result.

Read more...
 
Practical Scripting Part 13: A Handy Return-All-Values Script PDF Print E-mail

In the previous article of this series we came up with a script called DisplayClassProperties.vbs that displays the names of all the properties of a WMI class. Here’s what this script looks like, using Win32_BootConfiguration as the class we’re connecting to in our WMI moniker:

Option Explicit
On Error Resume Next
Dim strComputer
Dim strWMINamespace
Dim strWMIQuery
Dim objWMIService
Dim colItems
Dim objItem

strComputer = "."
strWMINamespace = "\root\CIMV2"
strWMIQuery = ":Win32_BootConfiguration"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & strWMINamespace & strWMIQuery)
WScript.Echo "Number of properties of " & strWMIQuery & " class is " & objWMIService.Properties_.count

For Each objItem in objWMIService.Properties_
    Wscript.Echo "Property: " & objItem.name
Next

Read more...
 
Practical Scripting Part 11: More Scripting Tricks PDF Print E-mail

In the previous article in this series we looked at two remote scripting tricks, one from a helpful reader and the other from the recently published Windows Vista Resource Kit. In this article we’re going to look at two more scripting tips. First, another remote scripting trick from another of our readers. And second, a real-world example showing how to use the Windows Management Instrumentation Command-line (WMIC).

Read more...
 
<< Start < Prev 1 2 3 4 Next > End >>

Results 10 - 18 of 29
Powered by IT CONTRACTORS and designed by EZPrinting web hosting