create default variables

Welcome Forums General PowerShell Q&A create default variables

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
1 year, 11 months ago.

  • Author
    Posts
  • #61530

    Participant
    Points: 4
    Rank: Member

    IS it possible to create a variable in powershell that is static.
    Even when you close powershell?

  • #61533

    Participant
    Points: 269
    Helping Hand
    Rank: Contributor

    You could use environment variables or you could add it to your all users psprofile.

  • #61536

    Participant
    Points: 4
    Rank: Member

    @ Olaf soyk

    Could you explain?

  • #61558

    Participant
    Points: 269
    Helping Hand
    Rank: Contributor

    How to create and modify environment variables is explained here: Creating and Modifying Environment Variables.

    And how to modify your Powershell profile or the systems Powershell profile you can find like this: Get-Help about_profiles

The topic ‘create default variables’ is closed to new replies.