Support Forums

Search found 10169 matches

by jvierra
Mon Jan 09, 2017 12:48 pm
Forum: PowerShell GUIs
Topic: Works in PowerShell not in PSStudio
Replies: 7
Views: 138

Re: Works in PowerShell not in PSStudio

Is it a multiline textbox?

Why would you use netsh commands when you can use WMI?
by jvierra
Mon Jan 09, 2017 12:09 pm
Forum: PowerShell GUIs
Topic: Works in PowerShell not in PSStudio
Replies: 7
Views: 138

Re: Works in PowerShell not in PSStudio

What is "Invoke-VMScript". Did you write it or is it for VMWare?
by jvierra
Mon Jan 09, 2017 4:54 am
Forum: PowerShell GUIs
Topic: Items in listbox
Replies: 5
Views: 94

Re: Items in listbox

Here is how to use objects in a listbox and export them as a CSV. You can use PowerShell to export the same as any other object collection. add-type -AssemblyName System.windows.forms using namespace System.Windows.Forms $lb = [Listbox]::New() $files = Get-ChildItem c:\ # convert to loadable...
by jvierra
Mon Jan 09, 2017 4:36 am
Forum: PowerShell GUIs
Topic: Items in listbox
Replies: 5
Views: 94

Re: Items in listbox

Here is a simple way to test and inspect and forms control without a form. At a CLI prompt do the following (PS5) PS > add-type -AssemblyName System.windows.forms PS > using namespace System.Windows.Forms PS > $lb = [Listbox]::New() PS > $lb.Items.AddRange(@('one','two...
by jvierra
Sun Jan 08, 2017 9:40 pm
Forum: PowerShell GUIs
Topic: Items in listbox
Replies: 5
Views: 94

Re: Items in listbox

if the items in the listbox are objects: $listbox1.Items | Export-Cs <filename>

If the items are just simple strings:
$listbox1.Items |Out-File <filename>
by jvierra
Sat Jan 07, 2017 6:18 am
Forum: PowerShell GUIs
Topic: Adding value to $ListView with ImageKey
Replies: 3
Views: 136

Re: Adding value to $ListView with ImageKey

I have no way of knowing what you did and the one line you posted doesn't explain anything. Look over my example very carefully until you understand what is happening. When you do you will probably see why your approach wouldn't work.
by jvierra
Sat Jan 07, 2017 4:31 am
Forum: PowerShell GUIs
Topic: Adding value to $ListView with ImageKey
Replies: 3
Views: 136

Re: Adding value to $ListView with ImageKey

The image name is the name of an image in the image control. It cannot be accessed as a URL.

ListView.Items.Add($text,$imageKey)
$imageKey is the name of an image stored in a key in an ImageList control.

Here is a complete demo:
by jvierra
Fri Jan 06, 2017 1:00 pm
Forum: Windows PowerShell
Topic: Search Active Directory via displayNamePrintable
Replies: 8
Views: 256

Re: Search Active Directory via displayNamePrintable

So it is an Exchange property?

-FIlter "DisplayNamePrintable -eq 'John Doe'"
by jvierra
Fri Jan 06, 2017 12:43 pm
Forum: Windows PowerShell
Topic: Search Active Directory via displayNamePrintable
Replies: 8
Views: 256

Re: Search Active Directory via displayNamePrintable

There is no such property as "displayNamePrintable" in AD. Where are yu getting this property from?
by jvierra
Fri Jan 06, 2017 11:18 am
Forum: Windows PowerShell
Topic: Search Active Directory via displayNamePrintable
Replies: 8
Views: 256

Re: Search Active Directory via displayNamePrintable

Get-AdUser -Filter "anr -eq 'j sm"\
Finds all names like "joe smith", "jim smith"... "Jay smalls" ...

Go to advanced search