| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format) |
| route-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:2be1a9d7-4ce7-7f05-4689-498dd0d04744 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9462:C35DD:10DE161:17E7DBF:6AFCD2D6 |
| html-safe-nonce | 7fee913d6f9ab16a3ab4dba5ff182a1e6a657ddc24da906fc7c6d5491776e56e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDYyOkMzNUREOjEwREUxNjE6MTdFN0RCRjo2QUZDRDJENiIsInZpc2l0b3JfaWQiOiIzNTQyMzYxODk2NTAzNzkyMzQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d8afc5b6fe414790878eb15cf083667d9febb44aa833c94f55209a66208294e3 |
| hovercard-subject-tag | pull_request:3833562643 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/PowerShell/PSScriptAnalyzer/2186/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/ac96b3311d97eb3363c87895a2c4cd0bfc40f5c6277b27e735b824ffac4ee4eb/PowerShell/PSScriptAnalyzer/pull/2186 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac96b3311d97eb3363c87895a2c4cd0bfc40f5c6277b27e735b824ffac4ee4eb/PowerShell/PSScriptAnalyzer/pull/2186 |
| og:image:alt | Closes #2046
PR Summary
Avoid using the New-Object cmdlet to create objects as it might perform poorly.
Instead, use a type initializer to construct or cast the intended object.
NoteIn most cases i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iRon7 |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d |
| turbo-cache-control | no-cache |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| 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 | 5410e4bebd3e45b138c853ecef3992279d86d5af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | pull-requests |
| Skip to content | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2186 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2186 |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=PowerShell%2FPSScriptAnalyzer |
| Reload | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Reload | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Reload | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| PowerShell | https://github.com/PowerShell |
| PSScriptAnalyzer | https://github.com/PowerShell/PSScriptAnalyzer |
| Code | https://github.com/PowerShell/PSScriptAnalyzer |
| Issues407 (407) | https://github.com/PowerShell/PSScriptAnalyzer/issues |
| Pull requests34 (34) | https://github.com/PowerShell/PSScriptAnalyzer/pulls |
| Discussions | https://github.com/PowerShell/PSScriptAnalyzer/discussions |
| Actions | https://github.com/PowerShell/PSScriptAnalyzer/actions |
| Projects | https://github.com/PowerShell/PSScriptAnalyzer/projects |
| Wiki | https://github.com/PowerShell/PSScriptAnalyzer/wiki |
| Security and quality | https://github.com/PowerShell/PSScriptAnalyzer/security |
| Insights | https://github.com/PowerShell/PSScriptAnalyzer/insights |
| https://github.com/PowerShell/PSScriptAnalyzer |
| iRon7 | https://github.com/iRon7 |
| PowerShell:main | https://github.com/PowerShell/PSScriptAnalyzer/tree/main |
| iRon7:#2046-AvoidUsingNewObject | https://github.com/iRon7/PSScriptAnalyzer/tree/%232046-AvoidUsingNewObject |
| Conversation | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Commits9 (9) | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits |
| Checks | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/checks |
| Files changed | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files |
| Add new AvoidUsingNewObject rule | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#top |
| iRon7 | https://github.com/iRon7 |
| PowerShell:main | https://github.com/PowerShell/PSScriptAnalyzer/tree/main |
| iRon7:#2046-AvoidUsingNewObject | https://github.com/iRon7/PSScriptAnalyzer/tree/%232046-AvoidUsingNewObject |
|
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Jun 9, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issue-4624379385 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| #2046 | https://github.com/PowerShell/PSScriptAnalyzer/issues/2046 |
| #2109 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2109 |
| PR has a meaningful title | https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission |
| Summarized changes | https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission |
| Change is not breaking | https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes |
| Make sure all .cs, .ps1 and .psm1 files have the correct copyright header | https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission |
| Work in Progress | https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Add new AvoidUsingNewObject rule to flag usage of New-Object cmdlet a… | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2 |
| e14adb2 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| June 9, 2026 18:03 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26536754627 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Mikey Lombardi (He/Him) (michaeltlombardi) | https://github.com/michaeltlombardi |
| Sean Wheeler (sdwheeler) | https://github.com/sdwheeler |
| code owners | https://github.com/PowerShell/PSScriptAnalyzer/blob/4b0117ca7d2887711c9699f467ba7171f8859156/.github/CODEOWNERS#L2 |
| June 9, 2026 18:03 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26536754812 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
|
Jun 9, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4461226976 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2 |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4461226976 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Add Copilot custom instructions | https://github.com/PowerShell/PSScriptAnalyzer/new/main?filename=.github/instructions/*.instructions.md |
| Learn how to get started | https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| docs/Rules/AvoidUsingNewObject.md | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| docs/Rules/AvoidUsingNewObject.md | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Tests/Rules/AvoidUsingNewObject.tests.ps1 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Implemented feedback from CoPilot | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/0aad726963f6b89c11943a4a44c28c63af979e33 |
| 0aad726 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/0aad726963f6b89c11943a4a44c28c63af979e33 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| June 10, 2026 08:09 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26562520682 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
|
Jun 10, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4465828211 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33 |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4465828211 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| docs/Rules/AvoidUsingNewObject.md | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Tests/Rules/AvoidUsingNewObject.tests.ps1 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Tests/Rules/AvoidUsingNewObject.tests.ps1 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Implemented more CoPilot suggestions | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/d9e0e6b59df40e33963fd9a4829b9ace7220de9b |
| d9e0e6b | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/d9e0e6b59df40e33963fd9a4829b9ace7220de9b |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| June 10, 2026 08:46 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26564001879 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
|
Jun 10, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4466082097 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4466082097 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| iRon7 | https://github.com/iRon7 |
| Jun 10, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r3386846678 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Resolved minor the grammar | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e061335231b26f5f55d7dfcdf470a70a535e7743 |
| e061335 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e061335231b26f5f55d7dfcdf470a70a535e7743 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Jun 10, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26565131431 |
|
| https://github.com/iRon7 |
| Merge branch 'main' into | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5 |
| PowerShell#2046 | https://github.com/PowerShell/PSScriptAnalyzer/issues/2046 |
| -AvoidUsingNewObject | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5 |
| 12b4bb1 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
|
Jun 10, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#ref-pullrequest-4390095474 |
|
Add new AvoidSecretDisclosure rule
#2183
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2183 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Jun 13, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-4697604630 |
| Andy Jordan (@andyleejordan) | https://github.com/andyleejordan |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Synced my fork and resolved "Cannot determine line endings" in PS5 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/b9fd31609d955628e61d545a5a461afee38e1420 |
| b9fd316 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/b9fd31609d955628e61d545a5a461afee38e1420 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Jun 23, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-4777815554 |
| Andy Jordan (@andyleejordan) | https://github.com/andyleejordan |
| this issue | https://github.com/PSAppDeployToolkit/PSAppDeployToolkit.Tools/issues/10#issuecomment-4777111148 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Merge branch 'main' into | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4 |
| PowerShell#2046 | https://github.com/PowerShell/PSScriptAnalyzer/issues/2046 |
| -AvoidUsingNewObject | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4 |
| 6b2ca61 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Sep 13, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5654326731 |
| Christoph Bergmeister (@bergmeister) | https://github.com/bergmeister |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Sep 14, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5669135093 |
| iRon7 | https://github.com/iRon7 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| September 14, 2026 19:01 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-31123626402 |
| started reviewing | https://github.com/PowerShell/PSScriptAnalyzer/sessions/e054ea98-fd9a-4732-bece-37fbddc8fc52 |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| September 14, 2026 19:02 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-31123664209 |
|
View session
| https://github.com/PowerShell/PSScriptAnalyzer/sessions/e054ea98-fd9a-4732-bece-37fbddc8fc52 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
|
Sep 14, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5201696194 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4 |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5201696194 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
|
Sep 14, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5202021871 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5202021871 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Merge branch 'main' into | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
| PowerShell#2046 | https://github.com/PowerShell/PSScriptAnalyzer/issues/2046 |
| -AvoidUsingNewObject | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
| 2066057 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Sep 15, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5677075082 |
| Sean Wheeler (@sdwheeler) | https://github.com/sdwheeler |
| Mikey Lombardi (He/Him) (@michaeltlombardi) | https://github.com/michaeltlombardi |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/sdwheeler |
| Sean Wheeler (sdwheeler) | https://github.com/sdwheeler |
|
Sep 15, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5211582610 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
| Sean Wheeler (sdwheeler) | https://github.com/sdwheeler |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5211582610 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| iRon7 | https://github.com/iRon7 |
| rule-template-docs.md | https://github.com/user-attachments/files/32247554/rule-template-docs.md |
| rule-template.md | https://github.com/user-attachments/files/32247555/rule-template.md |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Sep 17, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5713473892 |
| Sean Wheeler (@sdwheeler) | https://github.com/sdwheeler |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/sdwheeler |
| Sean Wheeler (sdwheeler) | https://github.com/sdwheeler |
| Sep 17, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5714440521 |
| iRon7 | https://github.com/iRon7 |
| #2215 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2215 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
| Updated rule documentation | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a |
| cb003e6 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Sean Wheeler (sdwheeler) | https://github.com/sdwheeler |
| September 17, 2026 14:48 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-31328479351 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Sep 22, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5782150637 |
| iRon7 | https://github.com/iRon7 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Sep 23, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5790833552 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Christoph Bergmeister (@bergmeister) | https://github.com/bergmeister |
| Sean Wheeler (@sdwheeler) | https://github.com/sdwheeler |
| in increments of 10, like the good old basic programs | https://stackoverflow.com/q/71330902/1701026 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Oct 22, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-6352086358 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Copilot | https://gh.io/copilot-coding-agent-docs |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.com/bergmeister |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| October 22, 2026 21:50 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-33997018277 |
| started reviewing | https://github.com/PowerShell/PSScriptAnalyzer/sessions/cbd0d669-fda4-4cc9-98e7-a7783b01b0c5 |
| Christoph Bergmeister (bergmeister) | https://github.com/bergmeister |
| October 22, 2026 21:51 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-33997059061 |
|
View session
| https://github.com/PowerShell/PSScriptAnalyzer/sessions/cbd0d669-fda4-4cc9-98e7-a7783b01b0c5 |
|
| https://github.com/apps/copilot-pull-request-reviewer |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
|
Oct 22, 2026
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5621372953 |
|
View reviewed changes
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a |
| Copilot | https://github.com/apps/copilot-pull-request-reviewer |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5621372953 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Restrict common parameter handling in New-Object correction | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962556 |
| Map PSObject property corrections to PSCustomObject | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962604 |
| Escape decoded string values in generated literals | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962644 |
| Preserve constructor behavior for constant arguments | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962676 |
| Validate ASTs before extracting constructor arguments | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962719 |
| Avoid corrections that discard command redirections | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962753 |
| The suggested correction uses a cast ([Type]value) for any constant argument, but PowerShell… | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r3386803344 |
| ArgumentNullException(string) expects a parameter name, but Strings.NullAstErrorMessage… | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r3386803299 |
| Avoid calling cmdAst.GetCommandName() twice per candidate node. Store the result in a local… | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r3386582551 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| Rules/AvoidUsingNewObject.cs | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b |
| https://github.com/iRon7 |
| iRon7 | https://github.com/iRon7 |
| Oct 23, 2026 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-6361648687 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| [] | https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes#instantiation-syntax |
| PR2196 | https://github.com/PowerShell/PSScriptAnalyzer/pull/2196 |
| #2220 | https://github.com/PowerShell/PSScriptAnalyzer/issues/2220 |
| Sean Wheeler (@sdwheeler) | https://github.com/sdwheeler |
| original README format | https://raw.githubusercontent.com/sdwheeler/PSScriptAnalyzer/9d57bad4903aa0e9a902b84bdc260b2f8c316684/docs/Rules/README.md |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
| https://github.co/hiddenchars |
| https://github.com/PowerShell/PSScriptAnalyzer/pull/{{ revealButtonHref }} |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2186 |
|
Copilot code review
| https://github.com/apps/copilot-pull-request-reviewer |
|
Copilot
| https://github.com/apps/copilot-pull-request-reviewer |
| Learn more about Copilot code review. | https://gh.io/copilot-code-review-docs |
|
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a |
|
| https://github.com/bergmeister |
|
Christoph Bergmeister (bergmeister)
| https://github.com/bergmeister |
|
| https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/2066057ec96deb52cc059845a7b23e4a2ce5e122 |
|
| https://github.com/michaeltlombardi |
|
Mikey Lombardi (He/Him) (michaeltlombardi)
| https://github.com/michaeltlombardi |
|
| https://github.com/sdwheeler |
|
Sean Wheeler (sdwheeler)
| https://github.com/sdwheeler |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
Rule request: AvoidNewObjectCmdlet
| https://github.com/PowerShell/PSScriptAnalyzer/issues/2046 |
| Please reload this page | https://github.com/PowerShell/PSScriptAnalyzer/pull/2186 |
|
| https://github.com/iRon7 |
|
| https://github.com/bergmeister |
|
| https://github.com/sdwheeler |
|
| https://github.com/apps/copilot-pull-request-reviewer |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |