Get-SqlLogFile
Gets an SMO LogFile object.
Syntax
Get-SqlLogFile [-database] <Database> [<CommonParameters>]
Detailed Description
The Get-SqlLogFile function gets a collection of SMO LogFile objects for the database.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
database |
|
true |
true (ByValue) |
|
Input Type
Microsoft.SqlServer.Management.Smo.Database
You can pipe SMO database objects to Get-SqlLogFile
Return Values
Microsoft.SqlServer.Management.Smo.LogFile
Get-SqlLogFile returns a Microsoft.SqlServer.Management.Smo.LogFile object.
Notes
Additional properties including the database, server and extended properties are included in the output.
Examples
EXAMPLE 1
Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-SqlLogFile
This command gets a collection of SMO LogFile objects for all data files in the pubs database.