Title: PS7 should revert to defaults if it can't load user powershell.config.json · Issue #27370 · PowerShell/PowerShell · GitHub
Open Graph Title: PS7 should revert to defaults if it can't load user powershell.config.json · Issue #27370 · PowerShell/PowerShell
X Title: PS7 should revert to defaults if it can't load user powershell.config.json · Issue #27370 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/27370
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PS7 should revert to defaults if it can't load user powershell.config.json","articleBody":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nThere's a race condition when starting a machine where OneDrive isn't running yet, but you start `pwsh`\n\n### Expected behavior\n\n```console\nPS7 starts, perhaps a warning message that it's using defaults (including `$profile`)\n```\n\n### Actual behavior\n\n```console\nPS7 fails to start\n```\n\n### Error details\n\n```console\nUnhandled exception. System.Management.Automation.PSInvalidOperationException: PowerShell has stopped working because of a security issue: Cannot read the configuration file: C:\\Users\\bburns\\OneDrive - Microsoft\\Documents\\PowerShell\\powershell.config.json\n---> System.IO.IOException: The cloud file provider is not running. : 'C:\\Users\\bburns\\OneDrive - Microsoft\\Documents\\PowerShell\\powershell.config.json'.\n at System.IO.RandomAccess.ReadAtOffset(SafeFileHandle handle, Span`1 buffer, Int64 fileOffset)\n at System.IO.Strategies.OSFileStreamStrategy.Read(Span`1 buffer)\n at System.IO.Strategies.BufferedFileStreamStrategy.ReadSpan(Span`1 destination, ArraySegment`1 arraySegment)\n at System.IO.StreamReader.ReadBuffer(Span`1 userBuffer, Boolean& readToUserBuffer)\n at System.IO.StreamReader.ReadSpan(Span`1 buffer)\n at Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 charsRequired)\n at Newtonsoft.Json.JsonTextReader.ParseValue()\n at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\n at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)\n at System.Management.Automation.Configuration.PowerShellConfig.ReadValueFromFile[T](ConfigScope scope, String key, T defaultValue)\n --- End of inner exception stack trace ---\n at System.Management.Automation.Configuration.PowerShellConfig.ReadValueFromFile[T](ConfigScope scope, String key, T defaultValue)\n at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\n at System.Management.Automation.Utils.GetPolicySettingFromConfigFile[T](ConfigScope[] preferenceOrder)\n at System.Management.Automation.Utils.GetPolicySetting[T](ConfigScope[] preferenceOrder)\n at Microsoft.PowerShell.CommandLineParameterParser.GetConfigurationNameFromGroupPolicy()\n at Microsoft.PowerShell.ConsoleHost.ParseCommandLine(String[] args)\n at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)\n at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)\n\n[process exited with code 3762504530 (0xe0434352)]\nYou can now close this terminal with Ctrl+D, or press Enter to restart.\n```\n\n### Environment data\n\n```powershell\n7.6.1\n```\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/SteveL-MSFT","@type":"Person","name":"SteveL-MSFT"},"datePublished":"2026-04-28T16:14:23Z","url":"https://github.com/PowerShell/PowerShell/issues/27370"}
| 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:76af489e-c801-0fa0-38b8-98d9419da4c3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B92C:1E7E3F:1124B2:16D9FE:6AFD0E67 |
| html-safe-nonce | a75c5e9b79f7fd8221512bb6bfcbb8de2be2e9c3c90b44e3852d1ce05f5d83f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTJDOjFFN0UzRjoxMTI0QjI6MTZEOUZFOjZBRkQwRTY3IiwidmlzaXRvcl9pZCI6IjEyNTYyOTkwNjcxMTQwNjU1MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ae559d2f87920bfa14745de254ea6dc3d6bf4e73db4367fe496c1d46bdacf9f |
| hovercard-subject-tag | issue:4344629479 |
| 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/27370/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe63781b27aa99b217782459f6ecb41dc6dc556af46cf4bd06924133bdd8cd64/PowerShell/PowerShell/issues/27370 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe63781b27aa99b217782459f6ecb41dc6dc556af46cf4bd06924133bdd8cd64/PowerShell/PowerShell/issues/27370 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SteveL-MSFT |
| 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