Search found 12664 matches

by jvierra
Wed Sep 19, 2018 5:06 am
Forum: Windows PowerShell
Topic: PowerShell Session
Replies: 5
Views: 69

Re: PowerShell Session

I cannot really understand what you are asking. Your English is a bit unclear.
by jvierra
Wed Sep 19, 2018 4:55 am
Forum: PowerShell GUIs
Topic: Strange DataGridView issue
Replies: 10
Views: 110

Re: Strange DataGridView issue

What host are you using? Does it match the installed version of PS on the remote system?
by jvierra
Wed Sep 19, 2018 4:27 am
Forum: Windows PowerShell
Topic: PowerShell Session
Replies: 5
Views: 69

Re: PowerShell Session

Not really a scripting issue. The speed is dependent on the server. If it is very busy or low on resources it can be very slow.

There is no way to persist a session.

How long does Enter-PsSession take? 10 seconds is not abnormal.
by jvierra
Wed Sep 19, 2018 4:23 am
Forum: PowerShell GUIs
Topic: Strange DataGridView issue
Replies: 10
Views: 110

Re: Strange DataGridView issue

What threading did you use. It has to be STA.
by jvierra
Wed Sep 19, 2018 3:29 am
Forum: Windows PowerShell
Topic: WMI question
Replies: 6
Views: 76

Re: WMI question

The issue is a lack of understanding of computer hardware. This is the same on Windows, Unix or Mac. Devices are not all volumes. USB devices are unknown until mounted. THe same is tru with CD/DVD devices. To get all volumes and CDs you can do this: Get-PnpDevice -Class volume,cdrom -PresentOnly
by jvierra
Wed Sep 19, 2018 2:08 am
Forum: Windows PowerShell
Topic: WMI question
Replies: 6
Views: 76

Re: WMI question

You are going to have to get all physical devices of the types you need. Note that CDs do not have partitions. The issue here I deciding how to design the script to return things that are the same and not try to use volume or partition. Start small - get all of you hardware devices then add extra in...
by jvierra
Wed Sep 19, 2018 12:53 am
Forum: Windows PowerShell
Topic: WMI question
Replies: 6
Views: 76

Re: WMI question

To get CD/DVD drives you have to use a different class:

Get-WmiObject win32_cdromdrive
by jvierra
Wed Sep 19, 2018 12:50 am
Forum: Windows PowerShell
Topic: WMI question
Replies: 6
Views: 76

Re: WMI question

The function already returns all drive types.
by jvierra
Tue Sep 18, 2018 11:03 am
Forum: PowerShell GUIs
Topic: Strange DataGridView issue
Replies: 10
Views: 110

Re: Strange DataGridView issue

Unfortunately without a simple example of your code there is no way to guess at the issue.

It is likely that the code is not retuning any information that can be displayed. Place trace statements in your code. Rin the script on the laptop to test that the script actually works on that configuration.
by jvierra
Tue Sep 18, 2018 10:50 am
Forum: PowerShell GUIs
Topic: POSH-SSH module is not functioning from a button press on a form
Replies: 2
Views: 49

Re: POSH-SSH module is not functioning from a button press on a form

Please run the form in the debugger and step though the button code.