You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get the events for some SQL DB backups, I had a list of DBs from Get-RubrikDatabase but when I wrote
foreach ($sqldb in $sqldbs) {
get-rubrikevent -EventType Backup -AfterDate (get-date).AddHours(-2) -ObjectType Mssql -ObjectName $sqldb.name
}
as we have many DBs with same name on different servers, I did not only get back the DBs I wanted but some event for objects with same name too.
So we would either need a -ObjectLocation or -ObjectId to really uniquely be able to identify an object.
The text was updated successfully, but these errors were encountered:
I have updated the documentation with the following example:
.EXAMPLE
Get-RubrikDatabase | ForEach-Object {Get-RubrikEvent -Limit 1 -Verbose -id $_.ID}
This will retrieve the last event for each of the SQL databases protected by Rubrik identifying the database by its object_id while displaying Verbose information
So you could use that sample to get the result you're after. Let me know if this helps you!
I was trying to get the events for some SQL DB backups, I had a list of DBs from Get-RubrikDatabase but when I wrote
foreach ($sqldb in $sqldbs) {
get-rubrikevent -EventType Backup -AfterDate (get-date).AddHours(-2) -ObjectType Mssql -ObjectName $sqldb.name
}
as we have many DBs with same name on different servers, I did not only get back the DBs I wanted but some event for objects with same name too.
So we would either need a -ObjectLocation or -ObjectId to really uniquely be able to identify an object.
The text was updated successfully, but these errors were encountered: