ÿþ<html> <head> <title>Add-SqlFileGroup</title> </head> <body> <h1>Add-SqlFileGroup</h1> <div>Adds a new filegroup to a database.</div> <h2> Syntax </h2> <code>Add-SqlFileGroup [-database] &lt;Database&gt; [-name] &lt;String&gt; [&lt;CommonParameters&gt;]</code> <h2> Detailed Description </h2> <div> The Add-SqlFileGroup function Adds a new filegroup to the specified database. </div> <h2> Related Commands </h2> <div> * <a href='Add-SqlFileGroup htm'>Add-SqlFileGroup</a><br/> * <a href='Add-SqlDatabase.htm'>Add-SqlDatabase</a><br/> * <a href='Get-SqlDatabase.htm'>Get-SqlDatabase</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>database&nbsp;</td> <td>&nbsp;</td> <td>true&nbsp;</td> <td>false&nbsp;</td> <td>&nbsp;</td> </tr> <tr valign='top'> <td>name&nbsp;</td> <td>&nbsp;</td> <td>true&nbsp;</td> <td>false&nbsp;</td> <td>&nbsp;</td> </tr> </table> <h2> Input Type </h2> <div>None You cannot pipe objects to Add-SqlFileGroup</div> <h2> Return Values </h2> <div>Microsoft.SqlServer.Management.Smo.FileGroup Add-SqlFileGroup returns an Microsoft.SqlServer.Management.Smo.FileGroup object.</div> <h2> Notes </h2> <div>Add-SqlFileGroup is used by Add-SqlDatabase.</div> <h2> Examples </h2> <h3> EXAMPLE 1</h3> <pre>$database = Get-SqlDatabase "Z002\sql2k8" "pubs" Add-SqlFileGroup $database 'FileGroup2' $database.Alter()</pre> <div>This command adds the filegroup FileGroup2 to the pubs database.</div> </body> </html>