Powershell profile and VS2013

  • Is there a way to set up Visual Studio 2013 so that my profile.ps1 runs on startup, or do I just have to load the SQLServer modules as needed in each script?

  • Using the Current User, All hosts profile ($Home\[My ]Documents\profile.ps1) should do it.

    Alternatively, if you're using PoShTools that will check for a Current User, Current Host profile file at $Home\[My ]Documents\PoshTools_profile.ps1

  • Doesn't appear to be working:

    I've copied my profile.ps1 to

    $Home\Documents\WindowsPowerShell\Poshtools_profile.ps1

    and

    $Home\Documents\WindowsPowerShell\profile.ps1

    but in neither case is it being loaded when I start Visual Studio.

    Also tried

    $Home\My Documents\... to no avail.

  • schleep (12/20/2016)


    Doesn't appear to be working:

    I've copied my profile.ps1 to

    $Home\Documents\WindowsPowerShell\Poshtools_profile.ps1

    and

    $Home\Documents\WindowsPowerShell\profile.ps1

    but in neither case is it being loaded when I start Visual Studio.

    Also tried

    $Home\My Documents\... to no avail.

    Try opening powershell and then at the prompt, just type: $Profile

    hit enter and it should show you the path to the current Profile.ps1 file.

    Sue

    Sue

  • And, Presto! Copying Poshtools_Profile.ps1 files to there did the trick.

    Thanks Sue!

    Edit: The $Home threw me off since it points to somewhere else entirely.

Viewing 5 posts - 1 through 4 (of 4 total)

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