Search found 52 matches
- 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...
- 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.
Doing this will present "ALL" entries within useriddan.potter wrote:$label1.text = $xmlfile.computers.Computer.userid
- 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...
- 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
thank you for your helpjvierra wrote:That would work.
- 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
Get-Content .\PS1inTextFileFormat.txt | Out-File c:\testout.ps1 -force
I guess this would be better
- 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
$file = Get-Content .\PS1inTextFileFormat.txt
$file | Out-File c:\testout.ps1
is this correct way to do it?
Thanks in advance
- 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
Thank you for the response.jvierra wrote:In a project add it as a txt file resource and open and save it as a ps1 file in the button.
Would you kindly advise of the command?
- 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 ...
- 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...
- 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...