Title: GitHub · Where software is built
Open Graph Title: PoshCode/Configuration
X Title: PoshCode/Configuration
Description: A module to help other modules have settings. Contribute to PoshCode/Configuration development by creating an account on GitHub.
Open Graph Description: A module to help other modules have settings. Contribute to PoshCode/Configuration development by creating an account on GitHub.
X Description: A module to help other modules have settings. Contribute to PoshCode/Configuration development by creating an account on GitHub.
Opengraph URL: https://github.com/PoshCode/Configuration
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The -Scope parameter for Export-Configuration has a parameterset (and it should not)","articleBody":"We need to be able to specify a value for `Export-Configuration -Scope` regardless of ParameterSet (just like you can for `Get-StoragePath`).\r\n\r\nCurrently, it has it's ParameterSet to the `ManualOverride` set, so you can only use it when specifying the -Name and -Company by hand (as in the first example below).\r\n\r\nI want all three of these to work:\r\n\r\n\r\n```gherkin\r\nScenario: Specifying the scope when listing metadata\r\n Given a module with the name 'MyModule1' and the author 'MyCompany' with code like this\r\n \"\"\"\r\n $Config = Import-Configuration -Company 'MyCompany' -Name MyModule1\r\n if(!$Config.ApiKey) {\r\n $Config =@{ ApiKey = \"My Default API Key\" }\r\n Export-Configuration $Config -Company 'MyCompany' -Name MyModule1 -Scope Machine\r\n }\r\n \"\"\"\r\n When the module is imported\r\n Then a settings file named Configuration.psd1 should exist in the Machine folder\r\n\r\nScenario: Specifying the scope when piping moduleinfo\r\n Given a module with the name 'MyModule1'\r\n When a user writes (something like) this\r\n \"\"\"\r\n Get-Module MyModule1 | Export-Configuration @{ ApiKey = \"MyApiKey\" } -Scope Enterprise\r\n \"\"\"\r\n Then a settings file named Configuration.psd1 should exist in the Enterprise folder\r\n\r\nScenario: Specifying the scope implicitly\r\n Given a module with the name 'MyModule1' and the author 'MyCompany' with code like this\r\n \"\"\"\r\n function Set-ApiKey {\r\n param($ApiKey)\r\n $Config =@{ ApiKey = $ApiKey }\r\n Export-Configuration $Config -Scope Machine\r\n }\r\n \"\"\"\r\n When I invoke Set-ApiKey \"OurCorporateApiKey\"\r\n Then a settings file named Configuration.psd1 should exist in the Machine folder\r\n```","author":{"url":"https://github.com/Jaykul","@type":"Person","name":"Jaykul"},"datePublished":"2016-12-02T19:40:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8/Configuration/issues/8"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:e03298c3-ff8f-b16f-74b4-1ce2a6dc018d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E974:19BB92:16D4733:1E79757:69780F70 |
| html-safe-nonce | bbdedef20fb30acd3ea24ad47a6678d6c7ee87b3ea5eba4cd5027073bf21baa0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTc0OjE5QkI5MjoxNkQ0NzMzOjFFNzk3NTc6Njk3ODBGNzAiLCJ2aXNpdG9yX2lkIjoiMzAxMTA1OTE2NzgwNDgyNDE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bbcb844567184bcba45d72cad00a37c74d54a965b2e0ee54afbbb1d29a36e9bd |
| hovercard-subject-tag | repository:22584579 |
| 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/PoshCode/Configuration/issues/8 |
| twitter:image | https://opengraph.githubassets.com/9641fe9d5ab55d5a86d3c6e9a3db1f36f2d6c9c70c93d158fee16560cd88264b/PoshCode/Configuration |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9641fe9d5ab55d5a86d3c6e9a3db1f36f2d6c9c70c93d158fee16560cd88264b/PoshCode/Configuration |
| og:image:alt | A module to help other modules have settings. Contribute to PoshCode/Configuration development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e71ed39771d00f42ce2fc9320895c8c608c164191e118eae487fc3bd0af6886d |
| turbo-cache-control | no-cache |
| 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 | 371710c20276ca72b3e82b0f41ece556a0038443 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width