Site menu:

Site search

Categories

Links:

Meta

Archive for 'Scripting'

Windows Powershell

Windows Powershell delivers a shell environment where you can use a bunch of different objects (WMI, COM, .NET framework) and their methods and properties from a command prompt. The shell provides strong output formatting and redirection. Finally you won’t have to switch to Perl anymore to make use of stuff like regular expressions. As a [...]

The windows task scheduler

The windows task scheduler. Often underappreciated for basic task scheduling. I do use it myself, on my webserver, to schedule my daily backups and collect webstatistics… every 15 minutes. Go have a look under the ‘advanced’ button of a scheduled task. You’d be surprised…

Scripting environment variables

Some code snippets for working with environment system variables:

Scripting Active Directory queries

If you want to query AD in your script you can use the advanced query strings from the W2K3 “Active Directory users and computers” MMC. Below is a script I used to query all locked out accounts in a domain: Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "Provider=ADsDSOObject;" Set objCommand = CreateObject("ADODB.Command") objCommand.ActiveConnection = objConnection objCommand.CommandText = [...]