René's URL Explorer Experiment


Title: Add new AvoidUsingNewObject rule by iRon7 · Pull Request #2186 · PowerShell/PSScriptAnalyzer · GitHub

Open Graph Title: Add new AvoidUsingNewObject rule by iRon7 · Pull Request #2186 · PowerShell/PSScriptAnalyzer

X Title: Add new AvoidUsingNewObject rule by iRon7 · Pull Request #2186 · PowerShell/PSScriptAnalyzer

Description: Download ScriptAnalyzer from PowerShellGallery. Contribute to PowerShell/PSScriptAnalyzer development by creating an account on GitHub.

Open Graph Description: 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...

X Description: 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...

Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/pull/2186

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:2be1a9d7-4ce7-7f05-4689-498dd0d04744
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9462:C35DD:10DE161:17E7DBF:6AFCD2D6
html-safe-nonce7fee913d6f9ab16a3ab4dba5ff182a1e6a657ddc24da906fc7c6d5491776e56e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDYyOkMzNUREOjEwREUxNjE6MTdFN0RCRjo2QUZDRDJENiIsInZpc2l0b3JfaWQiOiIzNTQyMzYxODk2NTAzNzkyMzQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd8afc5b6fe414790878eb15cf083667d9febb44aa833c94f55209a66208294e3
hovercard-subject-tagpull_request:3833562643
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/PowerShell/PSScriptAnalyzer/2186/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/ac96b3311d97eb3363c87895a2c4cd0bfc40f5c6277b27e735b824ffac4ee4eb/PowerShell/PSScriptAnalyzer/pull/2186
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ac96b3311d97eb3363c87895a2c4cd0bfc40f5c6277b27e735b824ffac4ee4eb/PowerShell/PSScriptAnalyzer/pull/2186
og:image:altCloses #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:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameiRon7
hostnamegithub.com
expected-hostnamegithub.com
Nonee3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d
turbo-cache-controlno-cache
go-importgithub.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id33149177
octolytics-dimension-repository_nwoPowerShell/PSScriptAnalyzer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33149177
octolytics-dimension-repository_network_root_nwoPowerShell/PSScriptAnalyzer
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5410e4bebd3e45b138c853ecef3992279d86d5af
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2186
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2186
Sign uphttps://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
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
PowerShellhttps://github.com/PowerShell
PSScriptAnalyzerhttps://github.com/PowerShell/PSScriptAnalyzer
Codehttps://github.com/PowerShell/PSScriptAnalyzer
Issues407 (407)https://github.com/PowerShell/PSScriptAnalyzer/issues
Pull requests34 (34)https://github.com/PowerShell/PSScriptAnalyzer/pulls
Discussionshttps://github.com/PowerShell/PSScriptAnalyzer/discussions
Actionshttps://github.com/PowerShell/PSScriptAnalyzer/actions
Projectshttps://github.com/PowerShell/PSScriptAnalyzer/projects
Wikihttps://github.com/PowerShell/PSScriptAnalyzer/wiki
Security and qualityhttps://github.com/PowerShell/PSScriptAnalyzer/security
Insightshttps://github.com/PowerShell/PSScriptAnalyzer/insights
https://github.com/PowerShell/PSScriptAnalyzer
iRon7https://github.com/iRon7
PowerShell:mainhttps://github.com/PowerShell/PSScriptAnalyzer/tree/main
iRon7:#2046-AvoidUsingNewObjecthttps://github.com/iRon7/PSScriptAnalyzer/tree/%232046-AvoidUsingNewObject
Conversationhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Commits9 (9)https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits
Checkshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/checks
Files changedhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files
Add new AvoidUsingNewObject rulehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#top
iRon7https://github.com/iRon7
PowerShell:mainhttps://github.com/PowerShell/PSScriptAnalyzer/tree/main
iRon7:#2046-AvoidUsingNewObjecthttps://github.com/iRon7/PSScriptAnalyzer/tree/%232046-AvoidUsingNewObject
https://github.com/iRon7
iRon7https://github.com/iRon7
Jun 9, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issue-4624379385
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
#2046https://github.com/PowerShell/PSScriptAnalyzer/issues/2046
#2109https://github.com/PowerShell/PSScriptAnalyzer/pull/2109
PR has a meaningful titlehttps://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission
Summarized changeshttps://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission
Change is not breakinghttps://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes
Make sure all .cs, .ps1 and .psm1 files have the correct copyright headerhttps://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission
Work in Progresshttps://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress
Please reload this pagehttps://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
e14adb2https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2
https://github.com/apps/copilot-pull-request-reviewer
Copilothttps://github.com/apps/copilot-pull-request-reviewer
June 9, 2026 18:03https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26536754627
https://github.com/iRon7
iRon7https://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 ownershttps://github.com/PowerShell/PSScriptAnalyzer/blob/4b0117ca7d2887711c9699f467ba7171f8859156/.github/CODEOWNERS#L2
June 9, 2026 18:03https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26536754812
https://github.com/apps/copilot-pull-request-reviewer
Copilothttps://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
Copilothttps://github.com/apps/copilot-pull-request-reviewer
https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4461226976
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Add Copilot custom instructionshttps://github.com/PowerShell/PSScriptAnalyzer/new/main?filename=.github/instructions/*.instructions.md
Learn how to get startedhttps://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
docs/Rules/AvoidUsingNewObject.mdhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
docs/Rules/AvoidUsingNewObject.mdhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Tests/Rules/AvoidUsingNewObject.tests.ps1https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/e14adb2deb691c6b36ba6156ffae8b4e89e9e8c2#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Implemented feedback from CoPilothttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/0aad726963f6b89c11943a4a44c28c63af979e33
0aad726https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/0aad726963f6b89c11943a4a44c28c63af979e33
https://github.com/iRon7
iRon7https://github.com/iRon7
Copilothttps://github.com/apps/copilot-pull-request-reviewer
June 10, 2026 08:09https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26562520682
https://github.com/apps/copilot-pull-request-reviewer
Copilothttps://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
Copilothttps://github.com/apps/copilot-pull-request-reviewer
https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4465828211
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
docs/Rules/AvoidUsingNewObject.mdhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-c049dfb94a530f43a80c15643d66eff05c523f2413c184aaf13b22312cb30087
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Tests/Rules/AvoidUsingNewObject.tests.ps1https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Tests/Rules/AvoidUsingNewObject.tests.ps1https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/0aad726963f6b89c11943a4a44c28c63af979e33#diff-02527675bee8420e06f1eeb6799d4a5b66b84c632afb63176f79a94ab54a0c6b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Implemented more CoPilot suggestionshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/d9e0e6b59df40e33963fd9a4829b9ace7220de9b
d9e0e6bhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/d9e0e6b59df40e33963fd9a4829b9ace7220de9b
https://github.com/iRon7
iRon7https://github.com/iRon7
Copilothttps://github.com/apps/copilot-pull-request-reviewer
June 10, 2026 08:46https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26564001879
https://github.com/apps/copilot-pull-request-reviewer
Copilothttps://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
Copilothttps://github.com/apps/copilot-pull-request-reviewer
https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-4466082097
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
iRon7https://github.com/iRon7
Jun 10, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r3386846678
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/d9e0e6b59df40e33963fd9a4829b9ace7220de9b#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Resolved minor the grammarhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e061335231b26f5f55d7dfcdf470a70a535e7743
e061335https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/e061335231b26f5f55d7dfcdf470a70a535e7743
https://github.com/iRon7
iRon7https://github.com/iRon7
Jun 10, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-26565131431
https://github.com/iRon7
Merge branch 'main' intohttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5
PowerShell#2046https://github.com/PowerShell/PSScriptAnalyzer/issues/2046
-AvoidUsingNewObjecthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5
12b4bb1https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/12b4bb1298b98e607ab027fc6d5326bdff038ef5
https://github.com/iRon7
iRon7https://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
iRon7https://github.com/iRon7
Jun 13, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-4697604630
Andy Jordan (@andyleejordan)https://github.com/andyleejordan
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Synced my fork and resolved "Cannot determine line endings" in PS5https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/b9fd31609d955628e61d545a5a461afee38e1420
b9fd316https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/b9fd31609d955628e61d545a5a461afee38e1420
https://github.com/iRon7
iRon7https://github.com/iRon7
Jun 23, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-4777815554
Andy Jordan (@andyleejordan)https://github.com/andyleejordan
this issuehttps://github.com/PSAppDeployToolkit/PSAppDeployToolkit.Tools/issues/10#issuecomment-4777111148
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Merge branch 'main' intohttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4
PowerShell#2046https://github.com/PowerShell/PSScriptAnalyzer/issues/2046
-AvoidUsingNewObjecthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4
6b2ca61https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/6b2ca610b7a1729aa89db779a715b6ee4ef9e9c4
https://github.com/iRon7
iRon7https://github.com/iRon7
Sep 13, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5654326731
Christoph Bergmeister (@bergmeister)https://github.com/bergmeister
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/bergmeister
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
Sep 14, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5669135093
iRon7https://github.com/iRon7
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/bergmeister
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
Copilothttps://github.com/apps/copilot-pull-request-reviewer
September 14, 2026 19:01https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-31123626402
started reviewinghttps://github.com/PowerShell/PSScriptAnalyzer/sessions/e054ea98-fd9a-4732-bece-37fbddc8fc52
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
September 14, 2026 19:02https://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
Copilothttps://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
Copilothttps://github.com/apps/copilot-pull-request-reviewer
https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5201696194
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://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 morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Merge branch 'main' intohttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122
PowerShell#2046https://github.com/PowerShell/PSScriptAnalyzer/issues/2046
-AvoidUsingNewObjecthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122
2066057https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/2066057ec96deb52cc059845a7b23e4a2ce5e122
https://github.com/iRon7
iRon7https://github.com/iRon7
Sep 15, 2026https://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 pagehttps://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 morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
iRon7https://github.com/iRon7
rule-template-docs.mdhttps://github.com/user-attachments/files/32247554/rule-template-docs.md
rule-template.mdhttps://github.com/user-attachments/files/32247555/rule-template.md
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
iRon7https://github.com/iRon7
Sep 17, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5713473892
Sean Wheeler (@sdwheeler)https://github.com/sdwheeler
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/sdwheeler
Sean Wheeler (sdwheeler)https://github.com/sdwheeler
Sep 17, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5714440521
iRon7https://github.com/iRon7
#2215https://github.com/PowerShell/PSScriptAnalyzer/pull/2215
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
Updated rule documentationhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a
cb003e6https://github.com/PowerShell/PSScriptAnalyzer/pull/2186/commits/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a
https://github.com/iRon7
iRon7https://github.com/iRon7
Sean Wheeler (sdwheeler)https://github.com/sdwheeler
September 17, 2026 14:48https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-31328479351
https://github.com/bergmeister
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
Sep 22, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5782150637
iRon7https://github.com/iRon7
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/iRon7
iRon7https://github.com/iRon7
Sep 23, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-5790833552
Please reload this pagehttps://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 programshttps://stackoverflow.com/q/71330902/1701026
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/bergmeister
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
Oct 22, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-6352086358
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Copilothttps://gh.io/copilot-coding-agent-docs
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.com/bergmeister
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
Copilothttps://github.com/apps/copilot-pull-request-reviewer
October 22, 2026 21:50https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#event-33997018277
started reviewinghttps://github.com/PowerShell/PSScriptAnalyzer/sessions/cbd0d669-fda4-4cc9-98e7-a7783b01b0c5
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
October 22, 2026 21:51https://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
Copilothttps://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
Copilothttps://github.com/apps/copilot-pull-request-reviewer
https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#pullrequestreview-5621372953
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Restrict common parameter handling in New-Object correctionhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962556
Map PSObject property corrections to PSCustomObjecthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962604
Escape decoded string values in generated literalshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962644
Preserve constructor behavior for constant argumentshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962676
Validate ASTs before extracting constructor argumentshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186#discussion_r4353962719
Avoid corrections that discard command redirectionshttps://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 pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
Rules/AvoidUsingNewObject.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186/files/cb003e6cbe438b9aee9ee71c7e5a08dc8cb44d9a#diff-3fe5a9ec4764f42316c1e019b8df3c803fdf389cb6c521f039c0627564e8081b
https://github.com/iRon7
iRon7https://github.com/iRon7
Oct 23, 2026https://github.com/PowerShell/PSScriptAnalyzer/pull/2186#issuecomment-6361648687
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
[]https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes#instantiation-syntax
PR2196https://github.com/PowerShell/PSScriptAnalyzer/pull/2196
#2220https://github.com/PowerShell/PSScriptAnalyzer/issues/2220
Sean Wheeler (@sdwheeler)https://github.com/sdwheeler
original README formathttps://raw.githubusercontent.com/sdwheeler/PSScriptAnalyzer/9d57bad4903aa0e9a902b84bdc260b2f8c316684/docs/Rules/README.md
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://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 pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2186
Rule request: AvoidNewObjectCmdlet https://github.com/PowerShell/PSScriptAnalyzer/issues/2046
Please reload this pagehttps://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
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.