René's URL Explorer Experiment


Title: DSC config overwrites existing custom oh-my-posh PowerShell profile line · Issue #53 · microsoft/WindowsDeveloperConfig · GitHub

Open Graph Title: DSC config overwrites existing custom oh-my-posh PowerShell profile line · Issue #53 · microsoft/WindowsDeveloperConfig

X Title: DSC config overwrites existing custom oh-my-posh PowerShell profile line · Issue #53 · microsoft/WindowsDeveloperConfig

Description: Hi team - thank you for sharing great config. I'm loving it! I found that the current WindowsDeveloperConfig DSC setup can overwrite an existing custom oh-my-posh initialization line in my PowerShell profile. First, I want to say I total...

Open Graph Description: Hi team - thank you for sharing great config. I'm loving it! I found that the current WindowsDeveloperConfig DSC setup can overwrite an existing custom oh-my-posh initialization line in my PowerShe...

X Description: Hi team - thank you for sharing great config. I'm loving it! I found that the current WindowsDeveloperConfig DSC setup can overwrite an existing custom oh-my-posh initialization line in my Powe...

Opengraph URL: https://github.com/microsoft/WindowsDeveloperConfig/issues/53

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DSC config overwrites existing custom oh-my-posh PowerShell profile line","articleBody":"Hi team - thank you for sharing great config. I'm loving it!\n\nI found that the current WindowsDeveloperConfig DSC setup can overwrite an existing custom `oh-my-posh` initialization line in my PowerShell profile.\n\nFirst, I want to say I totally understand this project is intentionally **opinionated**, so using the default `oh-my-posh` setup is completely reasonable if that is the intended behavior. I’m opening this mostly because it was confusing to me at first that DSC was modifying only the `oh-my-posh` line in my PowerShell profile silently changing prompt, and I wanted to leave a note in case someone else runs into the same thing.\n\nI also fully admit my suggested workaround may be a bit over-engineered and potentially inefficient: using a separate script-based DSC resource to detect an existing `oh-my-posh` line, even though there is already a dedicated `OhMyPosh/Shell` DSC implementation, is not ideal on paper. However, based on the current behavior on both sides, it seems like this may be the only practical way to avoid overwriting an existing custom `oh-my-posh` setup.\n\n### Current behavior\n\nIn `windows-dev-config/dev-config.winget`, the config uses:\n\n```yaml\n- type: OhMyPosh/Shell\n  name: ohMyPoshProfileSet\n  dependsOn:\n    - OhMyPosh\n  properties:\n    states:\n      - name: pwsh\n        command: oh-my-posh init pwsh\n```\n\nWhen DSC is applied, it updates the existing `oh-my-posh` init line in `$PROFILE` to the declared command.\n\nThat means a custom line like:\n\n```powershell\noh-my-posh init pwsh --config \"$HOME\\.config\\oh-my-posh\\M365Princess.omp.json\" | Invoke-Expression\n```\n\ngets rewritten to:\n\n```powershell\noh-my-posh init pwsh | Invoke-Expression\n```\n\n### Why this is a problem\n\nMany users customize their prompt via `--config`, and this is valid/manual user configuration. The rest of the profile remains untouched, but the `oh-my-posh` line is normalized and the custom theme/config is lost.\n\n### Suggested change\n\nInstead of using `OhMyPosh/Shell` directly here, please consider using a script-based DSC resource that:\n\n- checks whether `$PROFILE` already contains any non-comment `oh-my-posh init` line\n- **skips modification if one already exists**\n- only appends the default `oh-my-posh init pwsh | Invoke-Expression` line when no existing `oh-my-posh` initialization is present\n\nThis would preserve existing user customization while still bootstrapping oh-my-posh for users who do not already have it configured.\n\n### Why I’m suggesting this on the WindowsDeveloperConfig side\n\nThe upstream `oh-my-posh` DSC resource currently rewrites the matched init line unless it already contains the exact canonical command string, so it does not preserve extra args like `--config`. I totally admit that writing separate script to check `oh-my-posh init` line is bit over-engineered and potentially inefficient.\n\n### Possible implementation direction\n\nA `Microsoft.DSC.Transitional/PowerShellScript` resource could use:\n\n- `testScript`: return `$true` if `$PROFILE` already contains a non-comment `oh-my-posh init` line\n- `setScript`: create `$PROFILE` if missing and append the default line only if no such line exists\n\n### Expected behavior\n\nIf the profile already contains any valid `oh-my-posh init` command, DSC should treat that as compliant and avoid modifying it.\n","author":{"url":"https://github.com/shunkino","@type":"Person","name":"shunkino"},"datePublished":"2026-06-03T04:12:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/53/WindowsDeveloperConfig/issues/53"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:749776be-68f2-6196-499a-a3a82e4d9ba2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE736:3F1019:61C5E:81E1A:6A4D80A8
html-safe-nonce77fca11f6e78dd7953f9bdddd2ab79a1e3781e665feb28325f7f32302b4f8829
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzM2OjNGMTAxOTo2MUM1RTo4MUUxQTo2QTREODBBOCIsInZpc2l0b3JfaWQiOiIxNjk4MzA3MTMwOTI1MDg4OTM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac174a0fad2d13f6efd12b551da1361c65e13fb130f6c9cb820003bfcc0c2d6d29
hovercard-subject-tagissue:4576808583
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/WindowsDeveloperConfig/53/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cd96a7855dd140769a9ef37ccf49a0fb6501baeebe2bbd3133ae2cad1c3f1ad0/microsoft/WindowsDeveloperConfig/issues/53
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cd96a7855dd140769a9ef37ccf49a0fb6501baeebe2bbd3133ae2cad1c3f1ad0/microsoft/WindowsDeveloperConfig/issues/53
og:image:altHi team - thank you for sharing great config. I'm loving it! I found that the current WindowsDeveloperConfig DSC setup can overwrite an existing custom oh-my-posh initialization line in my PowerShe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshunkino
hostnamegithub.com
expected-hostnamegithub.com
Nonec6bf61c909482ec3072ef5d7a5a28f2a9d214788c9a44793eca1960048cb05ae
turbo-cache-controlno-preview
go-importgithub.com/microsoft/WindowsDeveloperConfig git https://github.com/microsoft/WindowsDeveloperConfig.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id1245803238
octolytics-dimension-repository_nwomicrosoft/WindowsDeveloperConfig
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1245803238
octolytics-dimension-repository_network_root_nwomicrosoft/WindowsDeveloperConfig
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6702a58b419a792226bd21ef0fb1bcb318bbcaa3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/WindowsDeveloperConfig/issues/53#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWindowsDeveloperConfig%2Fissues%2F53
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWindowsDeveloperConfig%2Fissues%2F53
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FWindowsDeveloperConfig
Reloadhttps://github.com/microsoft/WindowsDeveloperConfig/issues/53
Reloadhttps://github.com/microsoft/WindowsDeveloperConfig/issues/53
Reloadhttps://github.com/microsoft/WindowsDeveloperConfig/issues/53
Please reload this pagehttps://github.com/microsoft/WindowsDeveloperConfig/issues/53
microsoft https://github.com/microsoft
WindowsDeveloperConfighttps://github.com/microsoft/WindowsDeveloperConfig
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FWindowsDeveloperConfig
Fork 133 https://github.com/login?return_to=%2Fmicrosoft%2FWindowsDeveloperConfig
Star 1.8k https://github.com/login?return_to=%2Fmicrosoft%2FWindowsDeveloperConfig
Code https://github.com/microsoft/WindowsDeveloperConfig
Issues 10 https://github.com/microsoft/WindowsDeveloperConfig/issues
Pull requests 7 https://github.com/microsoft/WindowsDeveloperConfig/pulls
Actions https://github.com/microsoft/WindowsDeveloperConfig/actions
Projects https://github.com/microsoft/WindowsDeveloperConfig/projects
Models https://github.com/microsoft/WindowsDeveloperConfig/models
Security and quality 0 https://github.com/microsoft/WindowsDeveloperConfig/security
Insights https://github.com/microsoft/WindowsDeveloperConfig/pulse
Code https://github.com/microsoft/WindowsDeveloperConfig
Issues https://github.com/microsoft/WindowsDeveloperConfig/issues
Pull requests https://github.com/microsoft/WindowsDeveloperConfig/pulls
Actions https://github.com/microsoft/WindowsDeveloperConfig/actions
Projects https://github.com/microsoft/WindowsDeveloperConfig/projects
Models https://github.com/microsoft/WindowsDeveloperConfig/models
Security and quality https://github.com/microsoft/WindowsDeveloperConfig/security
Insights https://github.com/microsoft/WindowsDeveloperConfig/pulse
#87https://github.com/microsoft/WindowsDeveloperConfig/pull/87
DSC config overwrites existing custom oh-my-posh PowerShell profile linehttps://github.com/microsoft/WindowsDeveloperConfig/issues/53#top
#87https://github.com/microsoft/WindowsDeveloperConfig/pull/87
https://github.com/shunkino
shunkinohttps://github.com/shunkino
on Jun 3, 2026https://github.com/microsoft/WindowsDeveloperConfig/issues/53#issue-4576808583
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.