ÿþ<html> <head> <title>Get-SqlIndexFragmentation</title> </head> <body> <h1>Get-SqlIndexFragmentation</h1> <div>Returns index fragmentation.</div> <h2> Syntax </h2> <code>Get-SqlIndexFragmentation [-index] &lt;Index&gt; [&lt;CommonParameters&gt;]</code> <h2> Detailed Description </h2> <div> The Get-SqlIndexFragmentation function returns index fragmentation of the specified index. </div> <h2> Related Commands </h2> <div> * <a href='Get-SqlIndexFragmentation.htm'>Get-SqlIndexFragmentation</a><br/> </div> <h2> Parameters </h2> <table border='1'> <tr> <th>Name</th> <th>Description</th> <th>Required?</th> <th>Pipeline Input</th> <th>Default Value</th> </tr> <tr valign='top'> <td>index&nbsp;</td> <td>&nbsp;</td> <td>true&nbsp;</td> <td>true (ByValue)&nbsp;</td> <td>&nbsp;</td> </tr> </table> <h2> Input Type </h2> <div>None You can pipe SMO Index objects to Get-SqlIndexFragmentation</div> <h2> Return Values </h2> <div>System.Data.DataRow Get-SqlIndexFragmentation returns an array of System.Data.DataRow.</div> <h2> Notes </h2> <div>Performs the equivalent of DBCC SHOWCONTIG</div> <h2> Examples </h2> <h3> EXAMPLE 1</h3> <pre>Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-SqlTable -name authors | Get-SqlIndex | Get-SqlIndexFragmentation</pre> <div>This command gets index fragmentation of the indexes of the authors table</div> </body> </html>