Search found 151 matches

by mxtrinidad
Fri Jun 29, 2018 8:58 am
Forum: PowerShell GUIs
Topic: Unable to get Cells data from Datagridview (PShell 2.0)
Replies: 7
Views: 229

Re: Unable to get Cells data from Datagridview (PShell 2.0)

OK! Be mindful that there will be some commands in v2 that may not behave the same in v5. At the same time, also when working with .NET 2.0 object vs. 4.0. You know, if you're still using Windows 7 (specially SP1), you could installed Windows Management Framework 5.0: https://www.microsoft.com/en-us...
by mxtrinidad
Thu Jun 28, 2018 1:31 pm
Forum: PowerShell GUIs
Topic: Unable to get Cells data from Datagridview (PShell 2.0)
Replies: 7
Views: 229

Re: Unable to get Cells data from Datagridview (PShell 2.0)

I'm curious!
Question: For what reason you're using are still PowerShell V2.0?
by mxtrinidad
Thu Jun 28, 2018 1:22 pm
Forum: Windows PowerShell
Topic: Multiple exclude rule
Replies: 7
Views: 306

Re: Multiple exclude rule

As long the .NET object has the properties you need, you can pick any direction you like. $Files = Get-ChildItem -File C:\Setup $Files | Get-Member : LastWriteTime Property datetime LastWriteTime {get;set;} : There's no last modified date property in the $Files object. You will need to use the ".Las...
by mxtrinidad
Wed Jun 27, 2018 2:00 pm
Forum: PowerShell Studio
Topic: Double windows when building and launching executables
Replies: 1
Views: 290

Re: Double windows when building and launching executables

Can you please provide a print-screen image of the running app?
Also, provide Print-Screen of your Script Packager Setting for the "Script Engine" and the "Output Settings".
And, from the MSI Settings, the "Product Details".

This way we can identify what's wrong.

Thanks
by mxtrinidad
Wed Jun 27, 2018 12:53 pm
Forum: Windows PowerShell
Topic: Multiple exclude rule
Replies: 7
Views: 306

Re: Multiple exclude rule

Take a look at the *.Split() method. Use the filename with the split('_') to brake out the filename as elements to get: Country, and Year. You could be very creative! Just explore the .NET objects, then add the logic. $Files = Get-ChildItem -File C:\Setup | select Name, LastWriteTime foreach($FileNa...
by mxtrinidad
Wed Jun 20, 2018 11:04 am
Forum: Windows PowerShell
Topic: SAPIEN PowerShellStudio does not find functions in included files
Replies: 4
Views: 237

Re: SAPIEN PowerShellStudio does not find functions in included files

At the same time, for PowerShell Best Practice, you should follow PowerShell naming schema Verb-Noun format. Avoid use of possible reserved words or existing application names. You could use "Get-Print" instead of "Print" as a function name. https://blogs.technet.microsoft.com/pstips/2014/06/17/powe...
by mxtrinidad
Wed Jun 20, 2018 10:16 am
Forum: Windows PowerShell
Topic: SAPIEN PowerShellStudio does not find functions in included files
Replies: 4
Views: 237

Re: SAPIEN PowerShellStudio does not find functions in included files

Sorry! But you can't do that!

To load the function, it need to be part of the script or part of the PowerShell Profile, or be loaded as part of a module.
by mxtrinidad
Wed Jun 13, 2018 12:47 pm
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 1077

Re: Button - Start Job, how to multiple arguments, how to work with objects

I have to say that using the "Button - Start Job" is useful. I use it to demo executing PowerShell Core in a SAPIEN Windows Forms. And now, I'm talking about cross-platform scripting possibilities.

Don't hesitate to contact us!
by mxtrinidad
Wed Jun 13, 2018 7:55 am
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 1077

Re: Button - Start Job, how to multiple arguments, how to work with objects

I would say the simplest way would be to build a scriptblock with the SMO backup code, then use the Start-Job to execute in the background. Then, the button execute the code until the process completes. I will share some code I use for an Azure sample that may be adaptable to your app: $buttonRunSMO...