Detects invalid objects.
The cmdlet identifies invalid objects in multiple databases and analyzes them to generate reports on the results.
Invoke-DevartFindInvalidObjects -Connection <object> [-Database <string>] [-Alldatabases <SwitchParameter>] [-Log <string>] [-Report <string>] [<CommonParameters>]
Specifies a connection to the server where you want to find invalid objects. You can provide one of the following options:
DevartDatabaseConnectionInfo object, which contains detailed connection settings, produced by the New-DevartSqlDatabaseConnection cmdlet.-Connection <object>
| Property | Default value |
|---|---|
| Required | True |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies one or more databases separated by commas where you want to find invalid objects. The option overrides the values specified in the connection parameter.
-Database <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Finds invalid objects for all non-system databases specified in the connection parameter.
-Alldatabases <SwitchParameter>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | False |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Specifies a path to save a log file.
-Log <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
Generates a report in a CSV file format. You need to specify a path to save the report file.
-Report <string>
| Property | Default value |
|---|---|
| Required | False |
| Position | Named |
| Default value | - |
| Accept pipeline input | False |
| Accept wildcard characters | False |
<CommonParameters>
This cmdlet supports these common parameters:
Verbose – Provides detailed output about the command operation.Debug – Provides debugging information.ErrorAction – Specifies how to respond to errors.ErrorVariable – Stores error messages in a variable.WarningAction – Specifies how to respond to warnings.WarningVariable – Stores warning messages in a variable.InformationAction – Specifies how informational messages are handled.InformationVariable – Stores informational messages in a variable.OutBuffer – Controls the number of objects buffered before output.PipelineVariable – Stores the current pipeline object in a variable.OutVariable – Stores output objects in a variable.For more information, see About Common Parameters.
System.Boolean (returns true on success and false otherwise)
System.Boolean returns:
true if the operation was successful.false if the operation failed.Invoke-DevartFindInvalidObjects -Connection $connection -Database "AdventureWorks2025_Dev, AdventureWorks2025_Test"