-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Out-GridView not working as expected on PowerShell 7 #10599
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.
Milestone
Description
There is a script which retrieves some information from a database and returns values on console. When I run this script to fetch information and pipe it to Out-GridView it works just fine on PowerShell 5.1.18362.145.
I installed PowerShell 7 (7.0.0-preview.4) and installed Graphical tools (Microsoft.PowerShell.GraphicalTools)from Powershell Gallery, It is now able to return the value fine on console but when it is piped to Out-GridView, It throws exception.
Steps to reproduce
./Script-Name -ComputerName Server1.domail.com | Out-GridViewExpected behavior
Output on console with PowerShell 5.1, Works for Out-GridView too,
system.hostname : Server1.domain.com
owner Name : PRAKASH KUMAR
owner Email : [email protected]
os_family : windows
os_version : 2012R2
platform : vmware
Status : Running
Added at : Mar 20, 2017 11:10:23
landscape : Dev
purpose : testing
stability_zone : 2
Console Output on PowerShell 7, Not Working on Out-GridView
system.hostname : Server1.domain.com
owner Name : PRAKASH KUMAR
owner Email : [email protected]
os_family : windows
os_version : 2012R2
Platform : vmware
Status : Running
Added at : Mar 20, 2017 11:10:23
landscape : Dev
purpose : testing
stability_zone : 2
Actual behavior
Exception while executing with Out-GridView
ogv : At line:1 char:10
+ $_.owner Name
+ ~~~~
Unexpected token 'Name' in expression or statement.
At line:1 char:64
+ .\ITC-Query.ps1 -ComputerName or1010050152190.corp.adobe.com |ogv
+ ~~~
+ CategoryInfo : ParserError: (:) [Out-GridView], ParseException
+ FullyQualifiedErrorId : UnexpectedToken,OutGridView.Cmdlet.OutGridViewCmdletCommand
PS C:\Work\Working>
Environment data
Not Working for Out-GridView
Name Value
---- -----
PSVersion 7.0.0-preview.4
PSEdition Core
GitCommitId 7.0.0-preview.4
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Working for Out-GridView
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.