Different profiles with Windows Terminal

I feel that there should be a way to do this but I am drawing blanks at the moment and could really use some help. I am trying to integrate the new Windows Terminal into my daily personal routines and so far am really liking it. I watched one of the Channel 9 videos that really showed off some of the key features in a nice way:


This got me thinking; it would be nice if I could setup different PowerShell profiles in the Windows Terminal to support different things; one for AD administration, another for SQL Server DBA work, maybe one with standard variable names set for a test environment vs another with those variables set for a production environment.

While this seems easy enough in theory and I can setup different Terminal profiles they all seem to be calling the same Windows PowerShell shells in the background, so I am just getting the same profile loaded regardless of the Windows Terminal profile. I was hoping for a way to be able to load different Windows PowerShell profiles upon getting called. Is this possible? Am I missing something very basic or is what I am asking for just not possible without calling an entirely separate environment (like PoSh 5 vs PoSh 7, vs Az Shell)?

As I understood it you can have one profile for each individual environment and not multiple profiles for each environment.

I figured it out. It did turn out to be a lot easier than I thought. Basically there is a “commandline” option in the profiles.json file. I can just call that with “-noexit” and “-file” pointing to a file with specific parameters for that PowerShell session.

Olaf, yes you can have multiple profiles pointing to the same consoles. The only caveat I realized is that on the additional profiles you cannot have the “source” option specified; I think that is reserved for dynamic profiles.

I would love to show screenshots of examples, but I cannot figure out how to post images in this forum.

Cool. Thanks for sharing your findings.

Screenshots of code are usually pointless because you cannot copy the code. :wink: A part of your settings file or a sample settings file formatted as code or shared with a Github gist would by cool I think.