ÿþ<html> <head> <title>Get-SqlObjectPermission</title> </head> <body> <h1>Get-SqlObjectPermission</h1> <div>Gets an SMO ObjectPermissionInfo object.</div> <h2> Syntax </h2> <code>Get-SqlObjectPermission [-database] &lt;Database&gt; [&lt;CommonParameters&gt;]</code> <h2> Detailed Description </h2> <div> The Get-SqlObjectPermission function gets a collection of SMO ObjectPermissionInfo objects for the specified database. </div> <h2> Related Commands </h2> <div> * <a href='Get-SqlObjectPermission.htm'>Get-SqlObjectPermission</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>true (ByValue)&nbsp;</td> <td>&nbsp;</td> </tr> </table> <h2> Input Type </h2> <div>Microsoft.SqlServer.Management.Smo.Database You can pipe SMO database objects to Get-SqlObjectPermission</div> <h2> Return Values </h2> <div>Microsoft.SqlServer.Management.Smo.ObjectPermissionInfo Get-SqlObjectPermission returns a Microsoft.SqlServer.Management.Smo.ObjectPermissionInfo object.</div> <h2> Notes </h2> <div>Additional properties including the effective members of the ObjectPermissionInfo are returned. Nested AD/local groups are recursively enumerated and returned in a flat structure. SQL 2000 does not support this SMO method, instead a System.DataRow is returned of object permissions.</div> <h2> Examples </h2> <h3> EXAMPLE 1</h3> <pre>Get-SqlObjectPermission $(Get-SqlDatabase "Z002\sql2K8" pubs)</pre> <div>This command gets a collection of SMO ObjectPermissionInfo objects for SQL Server Z002\SQL2K8, pubs database.</div> <h3> EXAMPLE 2</h3> <pre>Get-SqlDatabase "Z002\sql2K8" | Get-SqlObjectPermission</pre> <div>This command gets a collection of SMO ObjectPermissionInfo objects for all user databases on SQL Server Z002\SQL2K8.</div> </body> </html>