Running this command:
Set-DbaStartupParameter -SqlInstance dbatest2 -SingleUser:$false -TraceFlags 2371,3226,4199
You get a message, Specified folder for ErrorLog file is not reachable by dbatest2
So I ran this:
Set-DbaStartupParameter -SqlInstance dbatest2 -SingleUser:$false -TraceFlags 2371,3226,4199 -offline
The sql service will not start because the function removes the drive letter for the errorlog location.
We have our instance installed on e:

Get-DbatoolsLog)Function to work correctly and not remove drive letter for ERRORLOG parameter.
Issue actually in get-dbastartupparameter walking the code
Turns out trimstart takes a regex rather than a string. Everydays a school
day.
It's doing a greedy match. Would also affect people with master data on d
or master log on l
Don't have a computer tonight, so will fix tomorrow unless someone else
wants to pick it up overnight
On Wed, 13 Dec 2017 at 18:21, trush99 notifications@github.com wrote:
Bug Report General Troubleshooting steps
- [ Yes] Verified running latest release of dbatools?
- [ Yes] Verified errors are not related to permissions?
- [ Yes] Can duplicate in new/fresh PowerShell.exe session?
Version Information
- Operating System (Name|Version): Windows 10 build 14393
- PowerShell Version: 5 build 10586 REV 117
- SQL Server (Edition|Version): 13.0.4435.0
Running this command:
Set-DbaStartupParameter -SqlInstance dbatest2 -SingleUser:$false
-TraceFlags 2371,3226,4199
You get a message, Specified folder for ErrorLog file is not reachable by
dbatest2So I ran this:
Set-DbaStartupParameter -SqlInstance dbatest2 -SingleUser:$false
-TraceFlags 2371,3226,4199 -offlineThe sql service will not start because the function removes the drive
letter for the errorlog location.We have our instance installed on e:
[image: image]
https://user-images.githubusercontent.com/34518739/33954898-5feff4b6-dfff-11e7-8c28-3f140458f252.png
- Attach any screenshots (if possible/allowed)
- Attach logs generated by dbatools (Get-DbatoolsLog)
- Attach output from PowerShell console (if possible/allowed)
Feature Request
Problem to solve
Function to work correctly and not remove drive letter for ERRORLOG
parameter.
Additional information—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sqlcollaborative/dbatools/issues/2849, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AFWoZupwZC4LBOamzlM2F3rJdt8rKNqVks5tABW4gaJpZM4RA-ZU
.
PR #2855 in to fix this. Will merge once appveyor's finished with it
Am taking the 👍 on my last comment as a sign this is fixed, so closing the issue
Most helpful comment
Issue actually in get-dbastartupparameter walking the code
Turns out trimstart takes a regex rather than a string. Everydays a school
day.
It's doing a greedy match. Would also affect people with master data on d
or master log on l
Don't have a computer tonight, so will fix tomorrow unless someone else
wants to pick it up overnight
On Wed, 13 Dec 2017 at 18:21, trush99 notifications@github.com wrote: