question

celsoglima avatar image
0 Votes"
celsoglima asked celsoglima answered

Powershell Profile For Test and Preview Modules

I thought about something yesterday, and I was wondering if some of you guys with a lot of experience with PowerShell might be able shed to some light on what I would like to do.

Could I use PowerShell profiles under a single user and the same version of PowerShell to have different modules and/or versions of modules installed? One possible use for what I am trying to do would be to check out a preview versions of modules, for example.

Has anybody done that already? Any suggestions on what I should or shouldn't do?

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

celsoglima avatar image
0 Votes"
celsoglima answered

I am aware Powershell profiles are just scripts. To be honest I might be making this more complicated than it should. Thus I am going to set the path environment variable and force my sessions to use different sets of %WindowsPowershell% folders depending on what I am trying to do. That is what I would have done on a Linux system anyway.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

Profiles are just PowerShell scripts. You can just load the one you want, say, from the PowerShell prompt.

I know this says "PowerShell 7" but it isn't specific to just that version: loading-different-powershell-profiles-on-startup-powershell-7


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.