Closed
Description
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
No Error. Usage like Find-DbaAgentJob -JobName filter*, filter2*
does not return any items unless your Agent Jobs have the asterisks in their name. This impacts cmdlets like Find-DbaAgentJob
.
Steps to Reproduce
$sqli = 'sqli'
New-DbaAgentJob -SqlInstance $sqli -Job 'FilteredJob'
Find-DbaAgentJob -SqlInstance $sqli -JobName filter*,filter2*
Please confirm that you are running the most recent version of dbatools
2.1.26
Other details or mentions
Latest development branch shows this issue.
dbatools/private/functions/Get-JobList.ps1
Lines 72 to 77 in 3dba5fd
A loop would be required or a piped -like
to handle multi-wildcards.
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe)
PowerShell Host Version
Name Value
---- -----
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
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 2017 (RTM-CU20) (KB4541283) - 14.0.3294.2 (X64)
Mar 13 2020 14:53:45
Copyright (C) 2017 Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
.NET Framework Version
.NET 8.0.10