Search found 49 matches

by daviesg6
Tue Nov 25, 2014 2:22 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

thanks, but this, as a standalone script, gives errors and reports the last logon value is invalid, even if it did work as it is, it does not allow me to search for a specific user and therefore would not be of use in the scenario I am looking to create. In addition, creating functions to perform a ...
by daviesg6
Tue Nov 25, 2014 10:11 am
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

Sorry, I thought I had posted why I was not using that, I had tried it previously and found I got numerous errors, it displayed a result but not the correct one. I was sure I had posted that while that displayed it errored and gave the wrong result but using the code I was trying normally gave the c...
by daviesg6
Tue Nov 25, 2014 9:26 am
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

you keep saying there has to be a value to display in the textbox, and I keep saying there is a value, but ok, I am going to make do with outputting to a file, which requires a value to populate the text file and works which is the issue I don't understand, and your insistence I need to specify some...
by daviesg6
Mon Nov 24, 2014 1:41 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

what I am asking is WHY this code $LastLogonButton_OnClick= { $results.Text=$logons=@() [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers | ForEach{ $logonInt=(Get-Aduser -Filter "sAMAccountName -eq '$($EntryBox.text)'" -server $_.Name -properties lastlogon).las...
by daviesg6
Fri Nov 21, 2014 3:29 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

I think you have misunderstood what I am trying to do. I do not want out-string to set a value, I am trying to get the value created by the code you provided to get the last logon time displayed in the text box. I know out-string cannot set a value it is just designed to output a value provided by o...
by daviesg6
Fri Nov 21, 2014 1:57 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

here is a much smaller file, this uses one of the scripts that works, as in it displays in the output text box, the element names have been left as the default ones used by primal forms. This version uses the same text box for both input and output but the code is the same, it still uses the out-str...
by daviesg6
Fri Nov 21, 2014 1:13 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

I do not have the pff file, I deleted it in error, I do have other ones, they use the same code and they all work, your suggested format IS what I use, the start of the code block details the textbox, it is then followed by the code I want executed and ends with the out-string, the code in question ...
by daviesg6
Fri Nov 21, 2014 12:14 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

here is the full script, GUI and all #Generated Form Function function GenerateForm { ######################################################################## # Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0 # Generated On: 11/11/2014 3:32 PM # Generated By: gdavies...
by daviesg6
Thu Nov 20, 2014 3:32 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

This is in a PrimalForms GUI, so standard powershell code is not always in play
by daviesg6
Thu Nov 20, 2014 2:27 pm
Forum: Windows PowerShell
Topic: Why does this not display the results in the output window
Replies: 32
Views: 7904

Re: Why does this not display the results in the output wind

ok, I get you're saying this shouldn't work, but it does on the other parts of the script, so I hit the Search ID button, this is told to Out-string $Results.Focus() and it displays on the screen, in the window I have designated as the results window. The same goes for the Search Name button, enter ...