Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8318785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:05:52+00:00 2026-06-08T22:05:52+00:00

This question answers how to launch PowerShell from Windows Explorer. I want to launch

  • 0

This question answers how to launch PowerShell from Windows Explorer.

I want to launch PowerShell from Windows Explorer with my TFS Shell Snap-In pre-loaded.

I created a batch file (RunPowerShell.bat) with this command** and put it in the System32 directory:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\tfshell.psc1" -noexit -command ". 'C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\TFSS

This works, but I’d like to do it with just typing “PowerShell” in the Windows Explorer address bar.

Is it possible to load this snapin from Windows Explorer just by typing “PowerShell”?

**The command shown above comes from the “Target” box of my PowerShell Console link in the menu option:

Enter image description here


UPDATE

Chris N put me in the right direction.

I had to do a few things to make it work, so I’ll put them here:

Create and register the following registry file (*.reg) so that PowerShell would be aware of the TFS PowerShell DLL file:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell]
"PowerShellVersion"="2.0"
"Vendor"="Microsoft Corporation"
"Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
"VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft"
"DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
"Version"="10.0.0.0"
"ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2010 Power Tools"
"AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2010 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
"CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

In Notepad, create a new file with the following command:

if ( (Get-PSSnapin -Name Microsoft.TeamFoundation.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{
    Add-PsSnapin Microsoft.TeamFoundation.PowerShell
}

The IF statement prevents an error if I load from the link in the Windows Menu.

Then, save that file as this:

%windir%\system32\WindowsPowerShell\v1.0\profile.ps1

This will make the command run for all shells and all profiles on Windows; read the link in Chris’s answer if you need a smaller scope.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:05:54+00:00Added an answer on June 8, 2026 at 10:05 pm

    Read the great article Windows PowerShell Profiles on PowerShell profiles. Depending on the profile you setup, you can affect any instance started of PowerShell on that machine.

    It should work to load the snap in from the following script (to affect ALL users and ALL shells):

    %windir%\system32\WindowsPowerShell\v1.0\profile.ps1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question: Automatically import models on Django shell launch has answers explaining how to
From the answers to this question it appears there's a file somewhere on our
From this question & the answers - What is the correct answer for cout
I need a process with administrator privileges. From this question and answers it seems
I have seen this question and its answers and they clear up some of
<hyperbole> Whoever answers this question can claim credit for solving the world's most challenging
This question has been asked before but the answers aren't always clear or are
This question has frequently been asked over stackoverflow.com but none of the answers work
In the answers to this question , we read that function f() {} defines
This question already has an answer here: view sql that linq-to-sql produces 3 Answers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.