Configuring startup parameters (trace flags) using PowerShell

  • (First off, my PowerShell skills are pretty much non-existent but I'm trying to learn.)

    I'm trying to use PowerShell to configure trace flags as startup parameters. (Ultimately the goal is automated deployment.) I found an article here describing how to do it, but I keep hitting an error message:


    My question is where is it getting this path from?

    Get-ItemProperty : Cannot find path 'C:\Instance Names\SQL' because it does not exist.

    If I can figure that out, I might get a little further with this.

    Thanks very much in advance.

  • Ok, I've figured out where the registry path comes from now. However, it does exist...


    I'm an administrator on this server, in case that's relevant. (I also explicitly ran PowerShell as an Administrator and still got the same error message.)

    Thanks.

  • Me again; I think I've figured it out so I thought I'd post it here in case anybody else has the same issue. Basically it worked fine if I saved the script locally as ps_parameters.ps1 and then called it like so in the PowerShell window:

    .\ps_parameters.ps1

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply