Gather IIS logs from your IIS servers

I needed a quick way to gather all IIS logfile locations in several SharePoint farms. IIS has a nasty way to reference to numbers instead of names in their logging directory structure, so you need to watch the Advanced Settings panel in IIS to figure out which logging directory is for which website.

This could be done easier, I thought. And so thought many before me.

… 

 

Adding members to groups with +1500 members in PowerShell

The Windows Active Directory does not really have hard limits when it comes to group memberships. There are however soft limits.

Any ADSI or WMI query to a list of your group memberships will turn out to 1000 members in Windows 2000 mode, or 1500 in Windows 2003 native mode. Only by using ADO range limits, you can go by this soft limit.

This shouldn’t pose a problem when you are just adding members to an already big group. However, it does. … 

 

Excel automation with Powershell

Powershell is Microsoft’s answer of decent shell scripting on the Windows platform. Equipped with the functions you would expect from VBScript, it behaves as an Unix shell script would. All commands can work from the command line, or as a set of instructions in a file.

Adding to the basic shell functions one would expect, such as file and directory manipulation, reading and writing text files, manipulating strings with regular expressions, Powershell also integrates with .NET 2.0 and higher to communicate with other functions, such as accessing the System.Windows.Forms object to make neat forms equipped with all the controls you would expect in a compiled application, or in this case: manipulating Excel workbooks.

Using Excel together with PowerShell can be very easy. Too bad the documentation is sparse on this topic, and the official documentation makes no mention of a workaround that is needed when using Excel with PowerShell on a machine which is not configured with regional settings set to EN-us. … 

 
css.php