Exactly as the title says, an example of how to change the Primary Group for a set of users returned by a search with PowerShell.
Continue reading ‘Changing the Primary Group with PowerShell’ »

A PowerShell function that allows directory recursion to a specified depth.
Continue reading ‘Limit recursion depth with Get-ChildItem’ »

A function to retrieve IIS log settings from a local or remote IIS 6 server. Written to be compatible with PowerShell 1.0.
Continue reading ‘PowerShell, IIS and log settings’ »

I bumped into a requirement to run a SysLog relay on one of my Windows 2008 R2 systems. After poking around on Google, and after getting a bit bored with the third-party offerings, I threw together a simple server of my own.
Continue reading ‘SysLog in PowerShell’ »

The goal of this PowerShell function is to create a report of permissions assigned to objects in Active Directory in much the same way as DsRevoke.
Continue reading ‘Get-DsAcl’ »

This function reads delivery restrictions from objects in Active Directory. By default it looks at Groups. As the same information can be returned using Get-DistributionGroup or Get-Mailbox using Exchange 2007; this function is aimed at Exchange 2003.
Continue reading ‘Accept or reject messages from’ »

A function to merge or join two objects. For example, to merge an entry from “Get-MailboxStatistics” with information about storage limits set on the account in Active Directory. This small function demonstrates how the Property members of two objects might be merged. Common properties on the additional object are discarded.
Continue reading ‘Merge-Object’ »

Active Directory contains a number of attributes which hold date information. This article shows how to generate LDAP Filters for these attributes in both VbScript and PowerShell.
Continue reading ‘Building LDAP filters for date based attributes’ »

A script to enumerate trust information from an Active Directory forest.
Continue reading ‘Listing Trusts’ »

Microsoft DNS is able to store records in Active Directory when running on a Domain Controller. The information is stored in a Binary Large Object (BLOB) called DNSRecord. No official maps for that attribute appear to have been published. The information below is a result of reverse engineering the contents of the attribute.

Michael Smith has a very pretty PowerShell script which uses the structures below, and a few more, to convert the DnsRecord attribute into a human readable format on his blog, Michael’s meanderings….

Update 02/02/2010: In December 2009, Microsoft released a (not entirely accurate) protocol specification including details of dnsRecord and dnsProperty: MS-DNSP.pdf
Continue reading ‘Mapping the DNSRecord attribute’ »