Using VB.NET
Because the majority of the code we've demonstrated so far in this book has been written in VBScript, you may be wondering why we are going to talk about Visual Basic.NET (VB.NET). Unfortunately, one of the drawbacks with the .NET Framework is that it currently does not provide native support for VBScript. It does support JScript, but since Visual Basic is a much more powerful language than JScript, we will use VB.NET in our examples.
As we mentioned earlier, one of the design goals for the .NET Framework was simplicity. With the .NET Framework class library, Microsoft has made developing Windows-based applications significantly easier. As far as Active Directory goes, it will not take long at all to map your ADSI knowledge to the classes, properties, and methods in the System.DirectoryServices namespace.
To get started using VB.NET, you'll need to get an integrated development environment (IDE) such as Visual Studio.NET (VS.NET), which is available from http://msdn.microsoft.com/vstudio/. Once you have VS.NET, you should download the latest .NET Framework SDK, which is available from http://msdn.microsoft.com/netframework/. Once you have both of those installed, you are ready to start programming with the .NET Framework.
To start a new project in VS.NET, select File → New → Project from the menu. At that point, you'll see a screen similar to the one in Figure 31-1.
Click on Visual Basic Projects and select Console Application from the Templates window. Now you have ...