Title: COM objects are not enumerating properly · Issue #3775 · PowerShell/PowerShell · GitHub
Open Graph Title: COM objects are not enumerating properly · Issue #3775 · PowerShell/PowerShell
X Title: COM objects are not enumerating properly · Issue #3775 · PowerShell/PowerShell
Description: Repro Open a File Explorer window first if you find $w.Count is 0 PSv6> $s = New-Object -ComObject "Shell.Application" PSv6> $w = $s.Windows() PSv6> $w.Count 1 PSv6> $w ## dump $w, and powershell should enumerate $w to unwrap the collect...
Open Graph Description: Repro Open a File Explorer window first if you find $w.Count is 0 PSv6> $s = New-Object -ComObject "Shell.Application" PSv6> $w = $s.Windows() PSv6> $w.Count 1 PSv6> $w ## dump $w, and powershell s...
X Description: Repro Open a File Explorer window first if you find $w.Count is 0 PSv6> $s = New-Object -ComObject "Shell.Application" PSv6> $w = $s.Windows() PSv6> $w.Count 1 PSv6> $w ## dum...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3775
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"COM objects are not enumerating properly","articleBody":"Repro\r\n------\r\nOpen a File Explorer window first if you find $w.Count is 0\r\n```\r\nPSv6\u003e $s = New-Object -ComObject \"Shell.Application\"\r\nPSv6\u003e $w = $s.Windows()\r\nPSv6\u003e $w.Count\r\n1\r\nPSv6\u003e $w ## dump $w, and powershell should enumerate $w to unwrap the collection\r\n```\r\nExpected Behavior\r\n--------------------\r\n$w is unwrapped and the contained items are dumpped out (PSv5 behavior)\r\n```\r\nApplication : System.__ComObject\r\nParent : System.__ComObject\r\nContainer :\r\nDocument : System.__ComObject\r\nTopLevelContainer : True\r\nType :\r\nLeft : -32000\r\nTop : -32000\r\nWidth : 160\r\nHeight : 28\r\nLocationName : 6.0.0-beta1\r\nLocationURL : file:///D:/PowerShell/6.0.0-beta1\r\nBusy : False\r\nName : File Explorer\r\nHWND : 923136\r\nFullName : C:\\WINDOWS\\Explorer.EXE\r\nPath : C:\\WINDOWS\\\r\nVisible : True\r\nStatusBar : False\r\nStatusText :\r\nToolBar : 1\r\nMenuBar : False\r\nFullScreen : False\r\nReadyState : 4\r\nOffline : False\r\nSilent : False\r\nRegisterAsBrowser : False\r\nRegisterAsDropTarget : True\r\nTheaterMode : False\r\nAddressBar : True\r\nResizable : True\r\n```\r\n\r\nActual Behavior\r\n-----------------\r\n```\r\nCount\r\n-----\r\n 2\r\n```\r\n\r\nEnvironment\r\n--------------\r\n```\r\nPSv6\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-beta\r\nPSEdition Core\r\nBuildVersion 3.0.0.0\r\nCLRVersion\r\nGitCommitId v6.0.0-beta.1\r\nOS Microsoft Windows 10.0.15063\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\nAdditional Observation\r\n-------------------------\r\nThe problem appears to be this:\r\n```\r\nPSv6\u003e $w._NewEnum()\r\nAn error occurred while enumerating through a collection: Could not load type 'System.Runtime.InteropServices.ComTypes.IEnumerator' from assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,\r\nPublicKeyToken=7cec85d7bea7798e'..\r\nAt line:1 char:2\r\n+ $w._NewEnum()\r\n+ ~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (System.__ComObject:__ComObject) [], RuntimeException\r\n + FullyQualifiedErrorId : BadEnumeration\r\n```","author":{"url":"https://github.com/jpsnover","@type":"Person","name":"jpsnover"},"datePublished":"2017-05-12T15:50:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/3775/PowerShell/issues/3775"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ad7bea0-aac0-8123-48e8-fa6cd295ac3f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDEC:400B9:2DDAB3D:41186A1:6A590C5F |
| html-safe-nonce | 28dff27e5dae1299659a4bc280880de1385f98e6a93b54e09b0119299f5bcfd8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREVDOjQwMEI5OjJEREFCM0Q6NDExODZBMTo2QTU5MEM1RiIsInZpc2l0b3JfaWQiOiI2NDMyMTI1NTU2NjQxODI3OTM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 88ca3a4e82782dafc8da9b2288c11942b3cc1093ebdfbc04d2c954c00c3e8fb1 |
| hovercard-subject-tag | issue:228333478 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3775/issue_layout |
| twitter:image | https://opengraph.githubassets.com/67bc1f6fe414810d8c35d0eafce95c47b889f1ff047c81cb066194d40a672c31/PowerShell/PowerShell/issues/3775 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/67bc1f6fe414810d8c35d0eafce95c47b889f1ff047c81cb066194d40a672c31/PowerShell/PowerShell/issues/3775 |
| og:image:alt | Repro Open a File Explorer window first if you find $w.Count is 0 PSv6> $s = New-Object -ComObject "Shell.Application" PSv6> $w = $s.Windows() PSv6> $w.Count 1 PSv6> $w ## dump $w, and powershell s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jpsnover |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb8ea312922ccce63e833964f9606d971cffb2d5b6c10a62c4a7dcc48d826e2 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 886a6c6fbce3d3caad5b3b995ef09ff6ca23f10e |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width