Search found 294 matches

by mxtrinidad
Wed Oct 11, 2017 8:20 am
Forum: PowerShell GUIs
Topic: Hiding file in list box
Replies: 4
Views: 888

Re: Hiding file in list box

When you use 'get-childitem', you'll have the file "extention" property available. This way you can narrow the selection to be listed.
Of course, it's possible to use both the '-filter' parameter or use the "... | where-object{.." to narrow the files.
by mxtrinidad
Wed Oct 11, 2017 8:11 am
Forum: PowerShell GUIs
Topic: Run Code after Form Load
Replies: 2
Views: 1352

Re: Run Code after Form Load

In a multi-form application, I normally a main form call other form(s) using a button(s) in this simple way: $MainForm_Load={ #TODO: Initialize Form Controls here } $buttonCallChildForm_Click={ #TODO: Place custom script here if((Show-ChildForm_psf) -eq 'OK') { } } Although, you can do this manually...
by mxtrinidad
Tue Oct 10, 2017 1:18 pm
Forum: PowerShell Studio
Topic: Writing Help Files
Replies: 2
Views: 415

Re: Writing Help Files

I you're talking about help file(s) for individual functions and/or module functions, in PowerShell Studio you can use "Generate Comment Based Help". At the same time the "PowerShell HelpWriter" product can assist in writing the Help file(s) structures which could be imported into PowerShell Studio....
by mxtrinidad
Thu Oct 05, 2017 8:47 am
Forum: PrimalScript
Topic: Source file not found
Replies: 6
Views: 5708

Re: Source file not found

If it helps in any way, I found an article in Kaspersky support on creating an exclusion rules: https://support.kaspersky.com/12160
by mxtrinidad
Wed Oct 04, 2017 5:21 pm
Forum: VBScript
Topic: Scipt to copy folder and delete another
Replies: 3
Views: 3383

Re: Scipt to copy folder and delete another

Or, as JVierra said... Learn and use PowerShell: Here's how it would look using both PowerShell with the DOS command you provided, as in PowerShell you can run most (if not all) of the DOS Command: $SourceComputer = "Computer1"; $TargetComputer = "Computer2"; $SourcePath = "\\$SourceComputer\" + 'c$...
by mxtrinidad
Wed Oct 04, 2017 9:26 am
Forum: PowerShell Studio
Topic: Format script damaging string format
Replies: 6
Views: 869

Re: Format script damaging string format

Ok! I was able to replicate the issue. Please try the following settings "Checked" on: x Place open brace on new line x Place statement keyword on a new line x Insert new line after Parameter attribute x Align hashtable equal signs x Leave block on the same line (I'm sure is is the one) x convert cu...
by mxtrinidad
Wed Oct 04, 2017 9:07 am
Forum: PowerShell Studio
Topic: Format script damaging string format
Replies: 6
Views: 869

Re: Format script damaging string format

Thanks for providing the screen image. Of course, I got different setting:
if ($value)
{
Out-Default 'True'
}
else
{
Out-Default 'False'
}

Let me change it and get back to you.
:)
by mxtrinidad
Wed Oct 04, 2017 8:54 am
Forum: PowerShell Studio
Topic: Format script damaging string format
Replies: 6
Views: 869

Re: Format script damaging string format

Ah! Understood. Sometime ago, I work in a Biztalk project were the XML needed to provide an ISO 8601 date format but coming from a SQL table date field. Maybe the following line might be (sort of) starting point then break it in pieces: $((Get-Date).ToString('yyyy-MM-dd HH:mm:ss.fffffffzzz')) Still ...
by mxtrinidad
Tue Oct 03, 2017 8:02 pm
Forum: PowerShell Studio
Topic: Format script damaging string format
Replies: 6
Views: 869

Re: Format script damaging string format

I wasn't able to replicate the issue in PS version 144. I copy/paste the code then reformat the script and didn't break code at the brackets {}. Although the code provided has some errors. Seems the one-liner don't need to use the replace and the results could be simpler. Try the following to see if...