Skip to content

VbScript: GetADSubnets

The VbScript below demonstrates how subnet information might be retrieved from Active Directory. It is possible to use a search using to return this information (for objectClass=subnet). This method connects to the subnets container and loops through the contents returning the network address and mask length in a Dictionary object.
Continue reading ›

Tagged , , ,

Modifying DNS records with WMI

Using WMI it is possible to modify any existing record hosted on a Microsoft DNS Server. The method used varies slightly depending on which record type we want to change.
Continue reading ›

Tagged , , , ,

Requirements for hosting SMTP servers

One of the most common problems with outbound mail is configuration of the SMTP service name and DNS records. This post briefly covers the requirements for running a public SMTP service, it does not matter if that server is Exchange, or Sendmail, or PostFix, the same set of rules apply.

The outbound rules do not apply when using a Smart Host to send mail. The inbound rules do not apply if receiving mail through a third-party (such as an anti-spam service).
Continue reading ›

Tagged , ,

Zones for single hosts with Microsoft DNS

Taking advantage of the fact that DNS will always respond with an authoritative answer if it has one allows exceptions for single hosts. In essence, using DNS as a centralised hosts file.
Continue reading ›

Tagged ,

Auditing userAccountControl with VbScript

This VbScript searches the current domain for all users with “User cannot change password”, “Password never expires”, or “Trusted for delegation” set, the results of the search are written to a tab delimited text file.
Continue reading ›

Tagged , , ,

NTFS, WMI, VbScript & listing explicit rights

This script uses WMI to enumerate each access control entry in an NTFS access control list, looking for explicit entries, that is, entries that are not inherited.
Continue reading ›

Tagged , , , , , ,

Log file scrubber for IIS

I wrote this script quite a few years ago to reduce the size of IIS log files by removing log entries for trivial requests (based on file extension for the request).
Continue reading ›

Tagged , , ,

NTFS, PowerShell, Get-ACL & listing explicit rights

A short script to list explicit rights assigned to a directory structure. It uses the recursive option of ls (an Alias for Get-ChildItem) to drop down through the directory structure.
Continue reading ›

Tagged , , , ,

Exchange 2007 & Manager Can Update Membership List

I recently went through another migration. One of the post migration tasks was to fix permission to update lists. The “ManagedBy” attribute had been copied across, but not the security descriptor from the group.

This show PowerShell script can be run from the Exchange Management Shell to grab the value from ManagedBy and write it back to the security descriptor. It’s a little messy, especially as there’s no way to check on the AD level if the box is ticked except by the security descriptor.
Continue reading ›

Tagged , , ,

Import contacts from a csv file using VbScript

Download ContactImport.vbs

This script will create contacts in Active Directory based on a formatted CSV file. It was written to allow automatic synchronisation of contacts using a CSV file as the source.
Continue reading ›

Tagged , , ,