Title: Improve debuggability of the ConstrainedLanguage mode · Issue #18628 · PowerShell/PowerShell · GitHub
Open Graph Title: Improve debuggability of the ConstrainedLanguage mode · Issue #18628 · PowerShell/PowerShell
X Title: Improve debuggability of the ConstrainedLanguage mode · Issue #18628 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement Today, if PowerShell starts in ConstrainedLanguage, there's no way to tell why did this happen. The problem is simply manifested as: Microsoft.PowerShell_profile.ps1: Cannot dot-source this comman...
Open Graph Description: Summary of the new feature / enhancement Today, if PowerShell starts in ConstrainedLanguage, there's no way to tell why did this happen. The problem is simply manifested as: Microsoft.PowerShell_pr...
X Description: Summary of the new feature / enhancement Today, if PowerShell starts in ConstrainedLanguage, there's no way to tell why did this happen. The problem is simply manifested as: Microsoft.PowerShel...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18628
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve debuggability of the ConstrainedLanguage mode","articleBody":"### Summary of the new feature / enhancement\n\nToday, if PowerShell starts in ConstrainedLanguage, there's no way to tell **why** did this happen.\r\n\r\nThe problem is simply manifested as:\r\n\r\n```\r\nMicrosoft.PowerShell_profile.ps1: Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.\r\n```\r\n\r\nThere're [multiple reasons](https://github.com/PowerShell/PowerShell/blob/319c93d6979fd99624c99b0a5ce49711378364bf/src/System.Management.Automation/security/wldpNativeMethods.cs#L186) for why the scripting is restricted and knowing which one exactly is very helpful when troubleshooting the issue.\n\n### Proposed technical implementation details (optional)\n\nThat'd be great if one could start pwsh in a mode where it would print out the high-level source of the issue (WLDP, AppLocker, cached or not, system or user, file policy enforcement).\r\n\r\nThe best would be if it could analyze CI policies present on the machine and highlight which one is the culprit (stretch goal.)","author":{"url":"https://github.com/wasker","@type":"Person","name":"wasker"},"datePublished":"2022-11-21T14:58:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/18628/PowerShell/issues/18628"}
| 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:baff5a5c-be5d-44c1-01d3-fa5206952374 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE60:3280E7:2C9D50D:3C890BE:6A549442 |
| html-safe-nonce | 5a166d4e8975b1555e4b510b211a82c72016977dc61168b03d2ff54c71098a14 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTYwOjMyODBFNzoyQzlENTBEOjNDODkwQkU6NkE1NDk0NDIiLCJ2aXNpdG9yX2lkIjoiNjMyMzI2MTk4Njk1NzQ2NDY0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 916f45d51c0a5f660326e8912ce95a270ecc1997efb31822a77fc8a7228bc060 |
| hovercard-subject-tag | issue:1458085389 |
| 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/18628/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b663e0fca1b95f89474ecbeb9b6c95f54772ca2856929f1d7ff7ca83384e47d/PowerShell/PowerShell/issues/18628 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b663e0fca1b95f89474ecbeb9b6c95f54772ca2856929f1d7ff7ca83384e47d/PowerShell/PowerShell/issues/18628 |
| og:image:alt | Summary of the new feature / enhancement Today, if PowerShell starts in ConstrainedLanguage, there's no way to tell why did this happen. The problem is simply manifested as: Microsoft.PowerShell_pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wasker |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width