Search found 13122 matches

by jvierra
Tue Feb 12, 2019 5:56 pm
Forum: PowerShell GUIs
Topic: Datacopier for DaRT
Replies: 27
Views: 305

Re: Datacopier for DaRT

The issue is that you haven't really understood what a progress bar is and how it works. For a good discussion on the Pbar right click on the control in the toolbox and read the documentation and the Spotlight article. The article and docs will show you how the pbar is intended to be used and give y...
by jvierra
Tue Feb 12, 2019 4:18 pm
Forum: PowerShell GUIs
Topic: Datacopier for DaRT
Replies: 27
Views: 305

Re: Datacopier for DaRT

You progress bar is too short. You need to output steps from the jobscript and use the output to increment the progress bar. With a copy there is no way to accurately predict the time that it will take.
by jvierra
Tue Feb 12, 2019 4:11 pm
Forum: PowerShell GUIs
Topic: Checkbox Question
Replies: 9
Views: 129

Re: Checkbox Question

Have you looked at the "Spotlight" article for the control?

Right click on the "ListView" control in the toolbox for the documentation and support articles. They will explain with examples, how to use a ListView. Most controls have useful articles on the right-click menu (context menu).
by jvierra
Tue Feb 12, 2019 12:02 pm
Forum: Windows PowerShell
Topic: Redirecting Start-Service output from a remote session
Replies: 2
Views: 72

Re: Redirecting Start-Service output from a remote session

No need to use Invoke-Command to start a remote service:

Get-Service $svc.Name -ComputerName <comouter> | Start-Service

To learn about redirecting review the following:

help redirection
by jvierra
Tue Feb 12, 2019 4:25 am
Forum: Windows PowerShell
Topic: New PsSession with a Progress Bar
Replies: 10
Views: 294

Re: New PsSession with a Progress Bar

Here is how you will have to do this to get the users and maintain the results while animating the button. $jobScript = { Param( $Server, $User ) $userProperties = 'set required properties here' Get-ADUser -Server $Server -Filter "Name -like '$User'" -Properties $userProperties } $updateScript = { P...
by jvierra
Tue Feb 12, 2019 4:04 am
Forum: Windows PowerShell
Topic: New PsSession with a Progress Bar
Replies: 10
Views: 294

Re: New PsSession with a Progress Bar

You cannot access forms control from a "JobScript" as it runs in a different process.
by jvierra
Tue Feb 12, 2019 4:00 am
Forum: Windows PowerShell
Topic: New PsSession with a Progress Bar
Replies: 10
Views: 294

Re: New PsSession with a Progress Bar

A progress bar and job cannot be used to connect a session. The session will not be available if created in a job. There is no way to do what you ask. You can just output each step of the connection to a textbox. Your code does not do what you say. It is not creating any sessions. It is getting back...
by jvierra
Fri Feb 08, 2019 6:18 pm
Forum: Windows PowerShell
Topic: Changing variable name on the fly
Replies: 8
Views: 252

Re: Changing variable name on the fly

I suspect that the big hang-up here is what do you mean by "change a variables name" There is no way to rename a variable in any language. Variables are used as pointers to values or as containers for values. They can be created and removed but there is no way to "rename" a variable. You can use the...
by jvierra
Fri Feb 08, 2019 5:21 pm
Forum: Windows PowerShell
Topic: Changing variable name on the fly
Replies: 8
Views: 252

Re: Changing variable name on the fly

I'm thinking the more I respond the more lectures I'm going to get on how I should learn more so I'll just go off and do that instead of continuing here. Thanks. The problem is that you are asking a question that cannot be understood because you are misusing terms. A simple form with an example of ...