I want to include some common variables between a pair of powershell scripts so that their values are only set in one place. Is it possible to import the values of some variables in Powershell v2, so that they are set in a file that both scripts can read?
Share
Write the variable definitions to a PowerShell script
and dot-source that script in your other scripts.
Output: