You can use VSCmdShell to run a PowerShell script from within Visual Studio 2008.

After installing VSCmdShell you can change the startup folder (working folder) of the powershell window:

  • Tools > Options > Power Toys > VSCmdShell
  • Set Shell Selection: Windows PowerShell
  • Set Solution Root Directory as Starting Directory




To show the powershell command prompt in Visual Studio 2008 click View > Shell Window (VSCmdShell)

To run a Test.ps1 PowerShell script, added to the Solution Items you can type .\Test.ps1


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.