Hello,
When I export my package using PS 2012 with PowerShell version 2.0 mode, the Out-GridView is not working. The development machine is running on PowerShell version 3.0 and has ISE too. .NET framework is up to date.
When I use the Out-GridView on both ISE and Shell, it's working without any issues. Why It's working if I export the script with PS 2012?
UPDATE: When I run the project directly on PS 2012 (engine is already set to user PowerShell version 2.0), the Out-GridView works. It's not working when I executed packaged script.
Error Message:
Out-GridView : To use the Out-GridView cmdlet, install the Windows PowerShell I
ntegrated Scripting Environment feature from Server Manager. (Could not load fi
le or assembly 'Microsoft.PowerShell.GraphicalHost, Version=1.0.0.0, Culture=ne
utral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system
cannot find the file specified.)
Any further help would be greatly appreciated. Thank you!
Package Export - Out-GridView not working with PowerShell version 2.0 mode
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
I was able to reproduce the error with V2. Interesting enough it works with V3.
Do you have both versions of PowerShell installed?
David
Do you have both versions of PowerShell installed?
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
Yes.
Dev machine is running on Windows 7 ENT with SP1
.NET 4.5 with all updates
PowerShell v3.0 with ISE
I build the project with v2 dependency. On v2, I can't utilize -OutputMode property. So I only used -OutGridView property, but it's not working when I execute the packaged script.
Dev machine is running on Windows 7 ENT with SP1
.NET 4.5 with all updates
PowerShell v3.0 with ISE
I build the project with v2 dependency. On v2, I can't utilize -OutputMode property. So I only used -OutGridView property, but it's not working when I execute the packaged script.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
I think this is isolated with V3 machine installed. I tested this on a V2 only machine and the Out-GridView works fine.
Note: There are a few bugs that are introduced into V2 after installing V3. We will look into further.
David
Note: There are a few bugs that are introduced into V2 after installing V3. We will look into further.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
I think this is a bug in PowerShell 3.0 engine itself! When I launch PowerShell with '-version 2' switch and try to access the 'Out-GridView' property, it gave me the same error message!
Package Export - Out-GridView not working with PowerShell version 2.0 mode
Something must of changed recently. I reported this to Microsoft using Connect:
https://connect.microsoft.com/PowerShel ... -v3-update
David
https://connect.microsoft.com/PowerShel ... -v3-update
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
One more thing. Please run the following in PowerShell Studio in v2 mode:
$PSVersionTable
Is it showing V3 or V2?
David
$PSVersionTable
Is it showing V3 or V2?
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
As per Microsoft response, it was a known issue in CTP2, but not sure whether is is by design or a bug!
http://connect.microsoft.com/PowerShell ... ersion-2-0
--------------------------------
PSVersion: 3.0
WSManStackVersion: 3.0
Serial....: 1.1.0.1
CLRVersion: 4.0.30319.17929
BuildVersion: 6.2.9200.16398
PSCompatibleVersions: {1.0, 2.0, 3.0}
PSRemoting...: 2.2
--------------------------------
http://connect.microsoft.com/PowerShell ... ersion-2-0
--------------------------------
PSVersion: 3.0
WSManStackVersion: 3.0
Serial....: 1.1.0.1
CLRVersion: 4.0.30319.17929
BuildVersion: 6.2.9200.16398
PSCompatibleVersions: {1.0, 2.0, 3.0}
PSRemoting...: 2.2
--------------------------------
Package Export - Out-GridView not working with PowerShell version 2.0 mode
As per in release documentaion:
Running the Windows PowerShell 2.0 engine does not replicate the complete Windows PowerShell 2.0 experience.
•The interactive features of Windows PowerShell 2.0, including format files, help content, the Out-GridView cmdlet, and Windows PowerShell ISE, are replaced by their Windows PowerShell 3.0 versions.
Running the Windows PowerShell 2.0 engine does not replicate the complete Windows PowerShell 2.0 experience.
•The interactive features of Windows PowerShell 2.0, including format files, help content, the Out-GridView cmdlet, and Windows PowerShell ISE, are replaced by their Windows PowerShell 3.0 versions.
Package Export - Out-GridView not working with PowerShell version 2.0 mode
I'm sorry to hear that, people still need to develop scripts targeting V2 machines. It would be nice if the Out-GridView actually worked despite the fact.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.