Search found 52 matches

by jimbobukii
Mon Aug 24, 2015 10:54 am
Forum: PowerShell GUIs
Topic: XML to $ListBox to $label1.text etc.
Replies: 5
Views: 3248

Re: XML to $ListBox to $label1.text etc.

Your basic problem is that you have multiple computers. Each one has a different "UserID". so assigning one to a label makes no sense. YOU can store the whole XML in the ListBox and just display the computerIDs. You can then set a label or textbox to the userid of the selected computer. I...
by jimbobukii
Mon Aug 24, 2015 10:47 am
Forum: PowerShell GUIs
Topic: XML to $ListBox to $label1.text etc.
Replies: 5
Views: 3248

Re: XML to $ListBox to $label1.text etc.

dan.potter wrote:$label1.text = $xmlfile.computers.Computer.userid
Doing this will present "ALL" entries within userid
by jimbobukii
Mon Aug 24, 2015 10:37 am
Forum: PowerShell GUIs
Topic: XML to $ListBox to $label1.text etc.
Replies: 5
Views: 3248

XML to $ListBox to $label1.text etc.

Hi I was wondering if someone could help me/my client? I have managed to pull from XML into a List box all the ComputerID from an XML file (example below) using [xml]$xmlfile = Get-Content "\\server\share$\xmlfile.xml $Computer = $xmlfile.Computers.Computer Load-ListBox -ListBox $listbox1 -Item...
by jimbobukii
Mon Aug 17, 2015 10:40 am
Forum: PowerShell GUIs
Topic: GUI save embedded ps1 file to disk
Replies: 7
Views: 3492

Re: GUI save embedded ps1 file to disk

jvierra wrote:That would work.
thank you for your help
by jimbobukii
Mon Aug 17, 2015 9:23 am
Forum: PowerShell GUIs
Topic: GUI save embedded ps1 file to disk
Replies: 7
Views: 3492

Re: GUI save embedded ps1 file to disk

works with

Get-Content .\PS1inTextFileFormat.txt | Out-File c:\testout.ps1 -force

I guess this would be better
by jimbobukii
Mon Aug 17, 2015 9:18 am
Forum: PowerShell GUIs
Topic: GUI save embedded ps1 file to disk
Replies: 7
Views: 3492

Re: GUI save embedded ps1 file to disk

I used the following which seemed to work
$file = Get-Content .\PS1inTextFileFormat.txt
$file | Out-File c:\testout.ps1

is this correct way to do it?

Thanks in advance
by jimbobukii
Mon Aug 17, 2015 9:09 am
Forum: PowerShell GUIs
Topic: GUI save embedded ps1 file to disk
Replies: 7
Views: 3492

Re: GUI save embedded ps1 file to disk

jvierra wrote:In a project add it as a txt file resource and open and save it as a ps1 file in the button.
Thank you for the response.
Would you kindly advise of the command?
by jimbobukii
Mon Aug 17, 2015 6:48 am
Forum: PowerShell GUIs
Topic: GUI save embedded ps1 file to disk
Replies: 7
Views: 3492

GUI save embedded ps1 file to disk

Hi, I have been looking at at a problem which I am sure someone will know the answer to, A customer of ours has created a GUI with PS 2012, they have added a .ps1 file to the project. I guess when they package to exe the .ps1 file will also be included? One of the requirements is that when a button ...
by jimbobukii
Thu Jan 23, 2014 5:27 pm
Forum: PowerShell GUIs
Topic: Loading ComboBox with XML data
Replies: 19
Views: 12542

Re: Loading ComboBox with XML data

but what you are trying to do does bot work. We do not use comboboxes for that. Comboboxes are for selecting from a list of options and not for displaying a single record. Look at the blog post on user interface design to see what I mean. What you are asking just doesn't work and makes absolutely n...
by jimbobukii
Thu Jan 23, 2014 2:53 pm
Forum: PowerShell GUIs
Topic: Loading ComboBox with XML data
Replies: 19
Views: 12542

Re: Loading ComboBox with XML data

The sample posted display the records correctly. Why would you use multiple combo boxes to display the same records fields. We would use synchronized text boxes for that. You need to study how to use and design with forms and data. That was partly the purpose for my PFF post. It shows you how to sy...