Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Automating Index Fragmentation Reports

Summary: Guest blogger, Laerte Junior discusses how to use PowerShell to automate an index fragmentation report and generate an Excel file.One of the day-to-day tasks of a DBA is to maintain your environment. This task includes checking the fragmentation of indexes. In this post, I will show how to automate this collection and generate an ...

PowerTip: Use PowerShell to Generate Object with Two Property Types

Summary: Use Windows PowerShell to generate an object with two property types. (image)  How can I use Windows PowerShell to generate an object with two property types from simply splitting a string? (image)  Use the ConvertFrom-String cmdlet to pipe a string, and then specify the desired property types, for example: PS C:\>“123 ...