Search found 6 matches

by DrKatzmann
Sat May 08, 2021 6:23 am
Forum: PowerShell
Topic: Run GUI with build in credentials
Replies: 1
Views: 8448

Run GUI with build in credentials

Hi all
I need to run af script (in a GUI) with the credentials of a service account. It is also necessary that there are no prompt. In other words, somehow I need to hardcode the credentials.

What is the best way to do this? The GUI wil be compiled to an *.exe file.

Regards
by DrKatzmann
Wed Mar 31, 2021 5:29 am
Forum: PowerShell GUIs
Topic: CheckedChanged wont work
Replies: 7
Views: 2876

Re: CheckedChanged wont work

Thanks jvierra I made it work, but only by exporting to *.ps1, adding the lines $radiobutton1.add_CheckedChanged($radiobutton_CheckedChanged) and $radiobutton2.add_CheckedChanged($radiobutton_CheckedChanged) to each radiobutton manually. Is this the way to make it work or should it be done all from ...
by DrKatzmann
Tue Mar 30, 2021 3:29 pm
Forum: PowerShell GUIs
Topic: CheckedChanged wont work
Replies: 7
Views: 2876

CheckedChanged wont work

Can anyone tell me why this aint working? When changing the selction of the radio buttons, nothing happen at the label (lblTEST). rdoTest.png $form1_Load={ } $rdoTEST1_CheckedChanged = { if ($this.Checked -eq $true) { #Use the Radio Button's Text to set the label $lblTEST.Text = "This is a test...
by DrKatzmann
Thu Mar 04, 2021 12:51 pm
Forum: Former and Future Customers - Questions
Topic: How to see the whole script
Replies: 1
Views: 14115

How to see the whole script

Can anyone tell me how to see the whole script, when working with forms?
Meaning both execution code and form code.

Regards
Kasper
by DrKatzmann
Tue Mar 02, 2021 4:55 am
Forum: PowerShell GUIs
Topic: Use variable from Function as Label text
Replies: 6
Views: 2440

Re: Use variable from Function as Label text

I ended up with no function and putting the code in the click event: $btnSoeg_Click={ if ($txtCU.TextLength -eq 0) { $rtxtKundenavn.Text = $helpText } else { $cuName = $txtCU.Text $customers = Get-ADOrganizationalUnit ` -Filter "Description -like '*$cuName*' -OR Name -like '*$cuName*'" ` -...
by DrKatzmann
Mon Mar 01, 2021 1:38 am
Forum: PowerShell GUIs
Topic: Use variable from Function as Label text
Replies: 6
Views: 2440

Use variable from Function as Label text

Hi I am trying to use a variable from a function and insert it in a Label field. It doesn't work, but I can't figure out why. If the the txtCU textbox is left empty, the label field (lblKundenavn) is updated as it should. If the txtCU textbox contains data, it should call the Function (which I think...