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
#### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
#### dbatools Module version:
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\dbatools.psd1
Version : 1.0.106
SQL Server:
Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64) Jun 15 2019 00:26:19 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 17134: ) (Hypervisor)
Report
When attempting to use Start-DbaXESession with a -StopAt (get-date).AddMinutes(10), I get the following error:
WARNING: [15:31:59][New-DbaAgentSchedule] Start date 04/21/2020 15:41:56 needs to be a valid date with format yyyyMMdd
Please note that I am in the UK, and so I would expect the start date to be passed in 21/04/2020 rather than 04/21/2020 as referenced in the error message. Also, I have replaced the name of my computer with MYCOMPUTERNAME, as I don't think my employer would like it if I put the real one on there!
Host used
[x ] powershell.exe
[x ] ISE
[x ] VS Code
Other (please specify)
If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe
[x ] Still buggy in powershell.exe
Errors Received
writeErrorStream : True
PSMessageDetails :
Exception : System.Exception: Start date 04/21/2020 15:41:56 needs to be a valid date with format yyyyMMdd
TargetObject : MYCOMPUTERNAME\sql2017
CategoryInfo : NotSpecified: (MYCOMPUTERNAME\sql2017:DbaInstanceParameter) [Write-Error], Exception
FullyQualifiedErrorId : dbatools_New-DbaAgentSchedule,Stop-Function
ErrorDetails : Start date 04/21/2020 15:41:56 needs to be a valid date with format yyyyMMdd
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Stop-Function, C:\Program Files\WindowsPowerShell\Modules\dbatools\allcommands.ps1: line 82910
at New-DbaAgentSchedule<Begin>, C:\Program Files\WindowsPowerShell\Modules\dbatools\allcommands.ps1: line 49560
at New-StopJob, C:\Program Files\WindowsPowerShell\Modules\dbatools\allcommands.ps1: line 67639
at Start-DbaXESession<Process>, C:\Program Files\WindowsPowerShell\Modules\dbatools\allcommands.ps1: line 67671
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {0, 1}
Environmental information
SQL Server:
Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64) Jun 15 2019 00:26:19 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 17134: ) (Hypervisor)
Report
When attempting to use Start-DbaXESession with a -StopAt (get-date).AddMinutes(10), I get the following error:
WARNING: [15:31:59][New-DbaAgentSchedule] Start date 04/21/2020 15:41:56 needs to be a valid date with format yyyyMMdd
Please note that I am in the UK, and so I would expect the start date to be passed in 21/04/2020 rather than 04/21/2020 as referenced in the error message. Also, I have replaced the name of my computer with MYCOMPUTERNAME, as I don't think my employer would like it if I put the real one on there!
Host used
If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe
Errors Received
Steps to Reproduce
Get-DbaXESessionTemplate -Template 'long running queries' | Import-DbaXESessionTemplate -SqlInstance localhost\sql2017
Start-DbaXESession -SqlInstance localhost\sql2017 -Session 'long running queries' -StopAt (get-date).AddMinutes(10)
Note: I suspect that this would have to be run on a computer with local settings set to UK in order to reproduce.
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: