Andreas Jordan
Andreas Jordan
I just had a look at the code. and there are different ways to fix the missing exceptions issue. I would suggest the following: We add `-EnableException:$EnableException` to all the...
@claude can you help me with this issue?
Claude did an ok job with a lot of good code to start with. But the branch is not meant to be merged as we don't want examples but code...
The code does not use `Get-DbaAgDatabaseReplicaState` at all.
Having a deeper look at the code and running the code in my lab I changed my minde: Claude did not very well. There will be a lot of extra...
Better source: ``` PS C:\Users\Admin> Get-DbaPbmCondition -SqlInstance server-006 -IncludeSystemObject | Where-Object Name -Match AlwaysOn | Format-List -Property Name, Facet, ExpressionNode Name : AlwaysOnAgAutomaticFailoverHealthCondition Facet : IAvailabilityGroupState ExpressionNode : (@IsAutoFailover =...
To get AvailabilityGroupState: ``` PS C:\Users\Admin> $ag = Get-DbaAvailabilityGroup -SqlInstance server-006 -AvailabilityGroup TestAG PS C:\Users\Admin> [Microsoft.SqlServer.Management.Smo.AvailabilityGroupState]::new($ag) IsOnline : True IsAutoFailover : False NumberOfSynchronizedSecondaryReplicas : 0 NumberOfNotSynchronizingReplicas : 1 NumberOfNotSynchronizedReplicas :...
Put it all together: ``` Facet: Instance of SQL Server ----------------------------- WSFC cluster service is offline Documentation: https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/wsfc-cluster-service-is-offline Policy Name: WSFC Cluster State Issue: WSFC cluster service is offline. Category:...
@ReeceGoding feel free to give feedback on this issue. I will try to write code for the first tests in the next days.
Here are some more information: https://github.com/dataplat/dbatools/issues/2190#issuecomment-3220221447