test-dbalastbackup dates of backup files outputs Dataplat.Dbatools.Utility.DbaDateTime[] When testing backups from a different domain
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
This is exactly the same as Issue #9337 that is resolved, it fixed the issue, unless the server the backups from are on a different domain. Most of our servers are on Domain1, but a couple of our servers are on a different domain2. I don't know if this is specific to writing results to a table or not like last time. But the server it writes out to is also in Domain 1. The powershell test is ran from Domain1.
Steps to Reproduce
# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference
Test-DbaLastBackup -SqlInstance Server1 -Destination DWSQL -IgnoreLogBackup |Write-DbaDbTableData -SqlInstance DWSQL -Database Backups -Table Testdata
Please confirm that you are running the most recent version of dbatools
2.1.23
Other details or mentions
All the restores from Domain1 show proper dates Here is a screen shot showing test results and the backup dates look like... well how they did on the other issue but only for the servers in domain2
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe), Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.14393.6343
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.6343
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name Value
PSVersion 7.4.2 PSEdition Core GitCommitId 7.4.2 OS Microsoft Windows 10.0.14393 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
SQL Server Edition and Build number
Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor) and Microsoft SQL Server 2019 (RTM-CU15) (KB5008996) - 15.0.4198.2 (X64) Jan 12 2022 22:30:08 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.7.4095.0