-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Member indexing on COM collection object doesn't work in .NET Core #4554
Copy link
Copy link
Closed
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Languageparser, language semanticsparser, language semantics
Description
Repro (1)
Steps to reproduce
PS> $fileSystem = New-Object -ComObject scripting.filesystemobject
PS> $drives = $fileSystem.Drives
PS> $drives["C"]Expected behavior
PS> $drives["C"]
Path : C:
DriveLetter : C
ShareName :
DriveType : 2
RootFolder : System.__ComObject
AvailableSpace : 344992370688
FreeSpace : 344992370688
TotalSize : 497394372608
VolumeName : Windows
FileSystem : NTFS
SerialNumber : -97466686
IsReady : True
Actual behavior
PS> $drives["C"]
PS>
Repro (2)
Open 2 File Explorer windows first if you find $w.Count is less than 2
Steps to reproduce
PS> $shell = New-Object -ComObject "Shell.Application"
PS> $windows = $shell.Windows()
PS> $windows.Count
3
PS> $windows[1]Expected behavior
PS> $windows[1]
Application : System.__ComObject
Parent : System.__ComObject
Container :
Document : System.__ComObject
TopLevelContainer : True
Type :
Left : 167
Top : 266
Width : 1099
Height : 629
LocationName : Quick access
LocationURL :
Busy : False
Name : File Explorer
HWND : 51184910
FullName : C:\WINDOWS\Explorer.EXE
Path : C:\WINDOWS\
Visible : True
StatusBar : False
StatusText :
ToolBar : 1
MenuBar : False
FullScreen : False
ReadyState : 4
Offline : False
Silent : False
RegisterAsBrowser : False
RegisterAsDropTarget : True
TheaterMode : False
AddressBar : True
Resizable : True
Actual behavior
PS> $windows[1]
PS>
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.5-34-g1a8563336a1a7f297c05fe06d732994f8efa8691-dirty
OS Microsoft Windows 10.0.15063
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Languageparser, language semanticsparser, language semantics