Search found 14608 matches

by jvierra
Mon Nov 23, 2020 6:10 pm
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

WARNING: That will not necessarily work with all MSI installs.
by jvierra
Mon Nov 23, 2020 4:45 pm
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

No. The process will have exited when the session ends. You must sleep in the session and not after the session.
by jvierra
Mon Nov 23, 2020 3:27 pm
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

That depends on the installer. When the session ends the install will be cancelled. You will need to contact the vendor to find out how to wait on the installer before ending the session. Some installers can be encouraged to wait until the install has completed or failed. Others will require that yo...
by jvierra
Mon Nov 23, 2020 1:54 pm
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

Syntax errors. You need to learn to not use quotes because th3ey look good.

Remoting an installer will not work because the session is being closed before the install is complete.
by jvierra
Wed Nov 18, 2020 5:56 am
Forum: PowerShell
Topic: Windows Service
Replies: 4
Views: 145

Re: Windows Service

If a service cannot be shut down then it cannot be uninstalled.

You cannot run a GUI from a service.

If a service throws an exception it can become hung and cannot be uninstalled. Stop the service and set it to manual. Restart the system and then un install the service.
by jvierra
Wed Nov 18, 2020 5:26 am
Forum: PowerShell
Topic: Windows Service
Replies: 4
Views: 145

Re: Windows Service

The most common reason for this is that service has not been shut down properly which prevents it from uninstalling.
by jvierra
Tue Nov 17, 2020 9:33 pm
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

Correct. The same is true for run spaces and jobs.
by jvierra
Tue Nov 17, 2020 6:24 am
Forum: PowerShell
Topic: Calling function in a Parallel foreach loop
Replies: 17
Views: 537

Re: Calling function in a Parallel foreach loop

Yes. You can only use "ForEach -Parallel" with PS 7.

Workflows can contain functions and load modules.
by jvierra
Sun Nov 15, 2020 6:57 pm
Forum: PowerShell
Topic: get-process returning one user when packaged
Replies: 8
Views: 199

Re: get-process returning one user when packaged

I suspect that Get-Process should also work as it is built on top of the WMI class but the security restrictions on the Net Framework classes for the CmdLets may be rest6rticting this. When some CmdLet fails then direct access via WMI may help.
by jvierra
Sun Nov 15, 2020 3:29 pm
Forum: PowerShell GUIs
Topic: help with buttons
Replies: 1
Views: 59

Re: help with buttons

I recommend reading some of the articles in the InfoCenter on this site. They will help you understand how to write PowerShell code and how to design and build forms. As stated your questions are too vague to answer. Here is a good place to start in the InfoCenter: https://info.sapien.com/index.php/...