diff --git a/functions/Get-DbaRegServer.ps1 b/functions/Get-DbaRegServer.ps1 index edcc052441..f2d0ec3c17 100644 --- a/functions/Get-DbaRegServer.ps1 +++ b/functions/Get-DbaRegServer.ps1 @@ -114,7 +114,7 @@ function Get-DbaRegServer { } } process { - if (-not $PSBoundParameters.SqlInstance) { + if (-not $PSBoundParameters.SqlInstance -and -not ($IsLinux -or $IsMacOs)) { $null = Get-ChildItem -Recurse "$home\AppData\Roaming\Microsoft\*sql*" -Filter RegSrvr.xml | Sort-Object LastWriteTime -Descending | Select-Object -First 1 }