[solved] Load variable

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
klarlichter
Posts: 40
Last visit: Sun Jan 16, 2022 3:44 am

[solved] Load variable

Post by klarlichter »

Hello,

I create inside a poweshell studio project the file

configuration.ps1

There i wrote
$user1 = "Test"

on another powershell script or form i use
Param ($user1)

Why i cant get that value $user1 from configuration.ps1 ?

I think he missing that source script that he understand where $user1 setup but how to do it?

It seems that i cant get a variable inside a form from a ps1 script?
Last edited by klarlichter on Thu Nov 28, 2019 10:29 am, edited 1 time in total.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Load variable

Post by jvierra »

klarlichter
Posts: 40
Last visit: Sun Jan 16, 2022 3:44 am

Re: Load variable

Post by klarlichter »

Hi,
i place it inside "Globals.ps1" and it load inside every script.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked