I mainly do Windows automation in PowerShell 7 but sometimes I use C# due to .NET limitations.
Database might be offline, this isn't an issue on your side.