Joseph
Joseph
@OwainEsau would it suffice to have the [DatabaseStatus value](https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.databasestatus?view=sqlserver-2016) in the output if -database is specified? Or would you rather just have a binary "available/not-available"?
@potatoqualitee advised this function should accept input from Get-DbaDatabase. Test-DBADbOwner still needs to be fixed so it doesn't filter out "not-accessible" databases. I'll take a stab at it.
Evening @potatoqualitee , thank you! I got latest from dev, tried out your changes. I did not know how to handle incoming object from the pipe, now I do. Test-DbaDbOwner...
I was able to reproduce this by running Get-DbaPowerPlan on a local non-admin powershell session, targetting my local computer. I'll test it against remote computers later today.
Running Get-DbaPowerPlan on a local non-admin PowerShell session against a remote computer works without any issues. Running against localhost: PS C:\windows\system32> Get-DbaPowerPlan localhost WARNING: [12:09:14][Get-DbaPowerPlan] Can't get Power Plan Info...
Something about permissions should probably be added to Get-DbaCmObject, which is called from Get-DbaPowerPlan. I started looking at it, but it's a bit over my head. The Get-DbaCmObject author @FriedrichWeinmann...
Can affirm this is happening in 0.9.72.0. Get-DbaBackupHistory -last is not returning last backups by date, which is what I expected. Maybe parameters for LastByLSN and LastByDate?