I can't check the PSS output as I use PSS on my computer (windows 10) and I compile it to EXE and transfer it to the server to check
unable to display variable data in text box
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.
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.
- sivandavid
- Posts: 14
- Last visit: Wed Jun 21, 2023 3:45 am
Re: unable to display variable data in text box
- sivandavid
- Posts: 14
- Last visit: Wed Jun 21, 2023 3:45 am
Re: unable to display variable data in text box
this is the imagesivandavid wrote: ↑Sat Jul 31, 2021 12:43 am sorry, I have the entire script working in CLI mode including interactive menus and all and I am trying to build it again in GUI form, I guess I should have upload an image to make it more clear, the load part is working without an issue and I created a different text box next to it for the update and I try to update it same way but it does not execute
I am unable to upload an image as I am new to this forum
thanks
Re: unable to display variable data in text box
It's just a simple demo of how to coode a form to update an AD object and it hasn't been tested on your system.sivandavid wrote: ↑Sat Jul 31, 2021 12:54 amthank you for going the extra mile to answer my question but I compiled this to EXE and tried it as well and it also don't save the entered fax number, I searched the entire ADSI object for this user and it didn't update
Don't make EXEs until you learn how to use PowerShell and Winform with AD. The demo just shows you a number of techniques but you still have to learn PowerShell and how to use the debugger as well as how toi use AD with WinForms.
- sivandavid
- Posts: 14
- Last visit: Wed Jun 21, 2023 3:45 am
Re: unable to display variable data in text box
hi
it's not my first time with PS, most of the time I write very complex scripts but in CLI, I did a few forms but can't understand the reason this specific command fails
it's not my first time with PS, most of the time I write very complex scripts but in CLI, I did a few forms but can't understand the reason this specific command fails
Re: unable to display variable data in text box
Your issue may be caused by using an EXE on a protected network as AD is remote to the application and me not behave as expected. That is why you need to use the debugger and account for all exceptions. All of this you wil learn if you take the time to learn PowerShell completely as you are likely justing copying code and trying to reuse it.sivandavid wrote: ↑Sat Jul 31, 2021 1:39 am hi
it's not my first time with PS, most of the time I write very complex scripts but in CLI, I did a few forms but can't understand the reason this specific command fails
I would test the commands you are using at a prompt without a GUI to be sure the simple code actually works as expected.
If there is no update then it is likley you are not getting the esxception. Any update that succeeds will not be thrown out silently. Learning AD more completely would help you troubleshoot this.
You cannot debug or troubleshoot this from an EXE. Use a script to test the code. That is why we have PowerShell installed by default on all current Windows systems.
- sivandavid
- Posts: 14
- Last visit: Wed Jun 21, 2023 3:45 am
Re: unable to display variable data in text box
as I wrote, without GUI it works so the command is good
I am not testing it remotely but on the server itself
I am not sure why you say that I am copying lines from other script but this is just not the case, I wrote 100% of the script myself, I got it to work 100% in powershell CLI but I am trying to recreate it in GUI for a better and faster use
I am not testing it remotely but on the server itself
I am not sure why you say that I am copying lines from other script but this is just not the case, I wrote 100% of the script myself, I got it to work 100% in powershell CLI but I am trying to recreate it in GUI for a better and faster use
- sivandavid
- Posts: 14
- Last visit: Wed Jun 21, 2023 3:45 am
Re: unable to display variable data in text box
I got it to work perfectly now in GUI, thanks for all the help
Re: unable to display variable data in text box
What was your mistake?sivandavid wrote: ↑Sat Jul 31, 2021 2:38 am I got it to work perfectly now in GUI, thanks for all the help
By the way the code you said you ran in the CLI wouldn't run in a CLI which is what made me confused.
I recommend trying to ask a simple question with only the basic bits. Long explanations are not useful as questions. You also seemed to be asking more than one competing question.
I still recommend taking the time to learn Power5shell from the bottom up instead of just trying to guess your way through.
There are many good books on PowerShell. I can give you some links if you are interested.