Title: Add ability to configure internet zone server names for execution policy in PS v7 · Issue #12336 · PowerShell/PowerShell · GitHub
Open Graph Title: Add ability to configure internet zone server names for execution policy in PS v7 · Issue #12336 · PowerShell/PowerShell
X Title: Add ability to configure internet zone server names for execution policy in PS v7 · Issue #12336 · PowerShell/PowerShell
Description: Summary of the new feature/enhancement Background Currently the PowerShell policies assume that if there is a "." (period) in a PowerShell script's path, that it is in the internet zone. This presents the user with a warning when running...
Open Graph Description: Summary of the new feature/enhancement Background Currently the PowerShell policies assume that if there is a "." (period) in a PowerShell script's path, that it is in the internet zone. This prese...
X Description: Summary of the new feature/enhancement Background Currently the PowerShell policies assume that if there is a "." (period) in a PowerShell script's path, that it is in the internet zo...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/12336
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add ability to configure internet zone server names for execution policy in PS v7","articleBody":"# Summary of the new feature/enhancement\r\n\r\n### Background\r\nCurrently the PowerShell policies assume that if there is a \".\" (period) in a PowerShell script's path, that it is in the internet zone. This presents the user with a warning when running PowerShell scripts are from a FQDN path (like \\\\\\server.domain.com).\r\n\r\nIn PowerShell versions up to v5.1, Windows Domain Administrators could define specific domains to be added to the Local Intranet Zone. Once added, PowerShell would then \"trust\" these paths when the ExecutionPolicy=Unrestricted and not present the user a security warning for each script that is run from these trusted paths.\r\n\r\n#7458 revealed that PowerShell Core (v6 and v7) intentionally removed the legacy IE API that was previously used to check the Local Intranet zones, and was replaced to check for just \".\" (periods). As per @TravisEz13 in #7458 I am creating this new feature request to discuss and address this problem.\r\n\r\n### Impact Of Changes Made In PowerShell Core\r\nMany Windows environments use a feature called Folder Redirection such that the user's \"Documents\" folder is \"redirected\" to a server (so it appears to the user that their Documents folder is on their computer, but it really lives on the server). Many environments that use folder redirection redirect to a FQDN UNC path like \\\\\\server.domain.com\\Users\\username\\Documents. Since these paths contain \".\" (periods), any script run from the user's Documents folder is presented with the PowerShell Security warning. This warning message also appears if the user has a PowerShell profile and starts PSv7, which presents this message each time:\r\n\r\n> Security warning\r\nRun only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your\r\ncomputer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning\r\nmessage. Do you want to run \\\\\\server.domain.com\\Users\\username\\Documents\\PowerShell\\Microsoft.PowerShell_profile.ps1?\r\n[D] Do not run [R] Run once [S] Suspend [?] Help (default is \"D\"):\r\n\r\nSo in any environment where either Folder Redirection is being used to a FQDN UNC path, or if the environment presents users their User/Department folders on a FQDN UNC path, this will trigger security warnings and will present problems to the end user if they try to run scripts from these locations. (At this time, we cannot deploy PowerShell v7 in our environment due to this problem).\r\n\r\nAdditional details about the problem and the discussion are available in #7458. \r\n\r\n### Goal\r\nAllow Windows Domain Administrators to configure what FQDN hosts are safe and not trigger a warning when using the Unrestricted execution policy. This would allow Windows Domain Administrators to set up PowerShell v7 so that users are still presented the security warning when running scripts from untrusted paths, but do not trigger this security warning when scripts are run from trusted paths when the ExecutionPolicy is set to Unrestricted.\r\n\r\nWindows Domain Administrators will also need the ability to add trusted/safe hosts via the PowerShell Core Group Policies to help deploy these trusted hosts to all domain computers.\r\n\r\nWhile the ability to trust FQDN hosts would solve the immediate problem and is the main problem I am hoping to have addressed, it would also be helpful if PowerShell administrators had the flexibility to not just add FQDN hosts (and all shares/files on it), but also specify paths with subfolders and wildcards. So for instance PowerShell Administrators could either choose to trust a FQDN host like **server.domain.com**, but also have the flexibility to trust a path like **\\\\\\server.domain.com\\Users\\\\*\\Documents\\PowerShell\\***.\r\n\r\n\r\n# Proposed technical implementation details\r\n@SteveL-MSFT and @TravisEz13 suggested the following proposal to help address this problem in #7458:\r\n\r\n> A list of allowed host filters, that allow PowerShell Wildcards in the powershell.config.json.\r\n\r\n\r\nAnd thank you for your time with this!","author":{"url":"https://github.com/aakash-shah","@type":"Person","name":"aakash-shah"},"datePublished":"2020-04-16T09:16:01Z","url":"https://github.com/PowerShell/PowerShell/issues/12336"}
| 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/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ee6e633-b37f-53c7-a93a-c298a13cc004 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82A6:9FF1A:1C1062F:2746D1B:6AFD0BD4 |
| html-safe-nonce | 5bbf82a3b9233c20bb57df7b93a0fbbabc66e3c5ed69924d258980834a6f78d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkE2OjlGRjFBOjFDMTA2MkY6Mjc0NkQxQjo2QUZEMEJENCIsInZpc2l0b3JfaWQiOiIyMTQxOTUxODM5MjkxOTAyOTMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e4df9a10307a4acedd79d6d209370d4e2442496fb80ed1988e6419a2764461da |
| hovercard-subject-tag | issue:600879502 |
| 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/12336/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d06c3a0302b26f987a4a4dfdba63aa0d76d6feaa77da5546e0aab6c4182ec131/PowerShell/PowerShell/issues/12336 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d06c3a0302b26f987a4a4dfdba63aa0d76d6feaa77da5546e0aab6c4182ec131/PowerShell/PowerShell/issues/12336 |
| og:image:alt | Summary of the new feature/enhancement Background Currently the PowerShell policies assume that if there is a "." (period) in a PowerShell script's path, that it is in the internet zone. This prese... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aakash-shah |
| hostname | github.com |
| expected-hostname | github.com |
| None | b29de2abb97b6307b16270785efeb58b51a117d5a9b659acf00b77aa00e7043b |
| 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 | 8c9e619def6d670dc18a45d3b02cea938c1c7e47 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width