Title: Warning on First Use of Export-Configuration · Issue #48 · PoshCode/Configuration · GitHub
Open Graph Title: Warning on First Use of Export-Configuration · Issue #48 · PoshCode/Configuration
X Title: Warning on First Use of Export-Configuration · Issue #48 · PoshCode/Configuration
Description: The first time Export-Configuration is used, it generates a warning message: WARNING: The Enterprise path C:\Users\
Open Graph Description: The first time Export-Configuration is used, it generates a warning message: WARNING: The Enterprise path C:\Users\
X Description: The first time Export-Configuration is used, it generates a warning message: WARNING: The Enterprise path C:\Users\<username>\AppData\Roaming\powershell cannot be found ...and it cannot be su...
Opengraph URL: https://github.com/PoshCode/Configuration/issues/48
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Warning on First Use of Export-Configuration","articleBody":"The first time Export-Configuration is used, it generates a warning message:\r\n\r\n`WARNING: The Enterprise path C:\\Users\\\u003cusername\u003e\\AppData\\Roaming\\powershell cannot be found`\r\n\r\n...and it cannot be suppressed with any of the usual methods:\r\n\r\n $callerWarningPreference = $WarningPreference\r\n $WarningPreference = 'SilentlyContinue'\r\n \r\n $new | Export-Configuration -WarningAction Ignore\r\n \r\n $WarningPreference = $callerWarningPreference\r\n\r\nI'm trying to present a clean experience to users and this error message is a bit cryptic and not at all helpful: Export-Configuration creates the path and writes the file without issue. Surely this message is better suited to the Verbose stream? Searching the source, it appears to be coming from [Get-ConfigurationPath](https://github.com/PoshCode/Configuration/blob/b9c46d552371ad86bc9b896f92f8a7c88051fb11/Source/Public/Get-ConfigurationPath.ps1#L83) and the flags to suppress warning aren't being pushed down into its scope.\r\n\r\nI suppose I could call Get-ConfigurationPath myself first--suppressing the warning there--but I think the issue still deserves attention in either the code or the documentation.","author":{"url":"https://github.com/aproposts","@type":"Person","name":"aproposts"},"datePublished":"2022-08-07T12:51:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/48/Configuration/issues/48"}
| 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:d78d8e03-6917-7b30-e36d-d0b45aef0c44 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A614:392487:32F3B27:46C5853:6977C7BC |
| html-safe-nonce | 4f2968d9a16eb0c9c4e601a18dc97fcf342a08c0694a96c5a5a07f96dba643df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjE0OjM5MjQ4NzozMkYzQjI3OjQ2QzU4NTM6Njk3N0M3QkMiLCJ2aXNpdG9yX2lkIjoiMjg0MDY3NTIwOTM4MTkyMjc0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae0d26e7fa4270db98b5b92192586f91bf091429bcbb90f4ef27d1529b1699e6 |
| hovercard-subject-tag | issue:1331007863 |
| 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/PoshCode/Configuration/48/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2aa1073c045c5099cb9c4305c7183740130c868f1c66df620acf52497b7e0b73/PoshCode/Configuration/issues/48 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2aa1073c045c5099cb9c4305c7183740130c868f1c66df620acf52497b7e0b73/PoshCode/Configuration/issues/48 |
| og:image:alt | The first time Export-Configuration is used, it generates a warning message: WARNING: The Enterprise path C:\Users\ |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aproposts |
| hostname | github.com |
| expected-hostname | github.com |
| None | 173f8c2eae2e017de550dd28a9ea88ad5c1e52c70df7ea05bcd820330b3b2fec |
| turbo-cache-control | no-preview |
| go-import | github.com/PoshCode/Configuration git https://github.com/PoshCode/Configuration.git |
| octolytics-dimension-user_id | 5641451 |
| octolytics-dimension-user_login | PoshCode |
| octolytics-dimension-repository_id | 22584579 |
| octolytics-dimension-repository_nwo | PoshCode/Configuration |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22584579 |
| octolytics-dimension-repository_network_root_nwo | PoshCode/Configuration |
| 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 | 7b19554cad55a536fac18eeedb416dd87c37b1f5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width