René's URL Explorer Experiment


Title: New-Service Should Throw on System StartupType · Issue #4803 · PowerShell/PowerShell · GitHub

Open Graph Title: New-Service Should Throw on System StartupType · Issue #4803 · PowerShell/PowerShell

X Title: New-Service Should Throw on System StartupType · Issue #4803 · PowerShell/PowerShell

Description: Note: The test case @{name = 'badstarttype'; parameter = "StartupType"; value = "System"} from test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests.ps1 failed in daily test run due to this issue, so it's disabled for...

Open Graph Description: Note: The test case @{name = 'badstarttype'; parameter = "StartupType"; value = "System"} from test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests.ps1 failed in daily test run...

X Description: Note: The test case @{name = 'badstarttype'; parameter = "StartupType"; value = "System"} from test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests....

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4803

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New-Service Should Throw on System StartupType","articleBody":"Note: The test case `@{name = 'badstarttype'; parameter = \"StartupType\"; value = \"System\"}` from `test\\powershell\\Modules\\Microsoft.PowerShell.Management\\Set-Service.Tests.ps1` failed in daily test run due to this issue, so it's disabled for now. Please re-enable the test when fixing this issue.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\nNew-Service -StartupType System -Name badstarttype -BinaryPathName \"$PSHOME\\powershell.exe\" -ErrorAction Stop\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nShould throw \r\n\r\n```none\r\nCouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\nCreates Service when run on release build\r\n\r\n```none\r\nName                : badstarttype\r\nRequiredServices    :\r\nCanPauseAndContinue : False\r\nCanShutdown         : False\r\nCanStop             : False\r\nDisplayName         : badstarttype\r\nDependentServices   : {}\r\nMachineName         : .\r\nServiceName         : badstarttype\r\nServicesDependedOn  :\r\nStartType           :\r\nServiceHandle       : Microsoft.Win32.SafeHandles.SafeServiceHandle\r\nStatus              : Stopped\r\nServiceType         : Win32OwnProcess\r\n```\r\n\r\nFails Fast on debug build:\r\n\r\n```none\r\nFailFast: bad StartupType\r\n\r\n   at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)\r\n   at System.Management.Automation.Diagnostics.Assert(Boolean condition, String whyThisShouldNeverHappen, String detailMessage) in C:\\github\\PowerShell\\src\\System.Management.Automation\\utils\\assert.cs:line 196\r\n   at System.Management.Automation.Diagnostics.Assert(Boolean condition, String whyThisShouldNeverHappen) in C:\\github\\PowerShell\\src\\System.Management.Automation\\utils\\assert.cs:line 131\r\n   at Microsoft.PowerShell.Commands.NewServiceCommand.BeginProcessing() in C:\\github\\PowerShell\\src\\Microsoft.PowerShell.Commands.Management\\commands\\management\\Service.cs:line 2018\r\n   at System.Management.Automation.Cmdlet.DoBeginProcessing() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\cmdlet.cs:line 164\r\n   at System.Management.Automation.CommandProcessorBase.DoBegin() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\CommandProcessorBase.cs:line 500\r\n   at System.Management.Automation.CommandProcessor.DoBegin() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\CommandProcessor.cs:line 272\r\n   at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\pipeline.cs:line 1050\r\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\pipeline.cs:line 489\r\n   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\runtime\\Operations\\MiscOps.cs:line 455\r\n   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\interpreter\\CallInstruction.Generated.cs:line 569\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\interpreter\\ControlFlowInstructions.cs:line 356\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\interpreter\\ControlFlowInstructions.cs:line 356\r\n   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\interpreter\\Interpreter.cs:line 111\r\n   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\interpreter\\LightLambda.Generated.cs:line 78\r\n   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\ScriptCommandProcessor.cs:line 516\r\n   at System.Management.Automation.DlrScriptCommandProcessor.Complete() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\ScriptCommandProcessor.cs:line 417\r\n   at System.Management.Automation.CommandProcessorBase.DoComplete() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\CommandProcessorBase.cs:line 614\r\n   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\pipeline.cs:line 607\r\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\pipeline.cs:line 519\r\n   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\hostifaces\\LocalPipeline.cs:line 426\r\n   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc() in C:\\github\\PowerShell\\src\\System.Management.Automation\\engine\\hostifaces\\LocalPipeline.cs:line 622\r\n   at System.Threading.Thread.ThreadMain_ThreadStart()\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n\r\n   at System.Environment.FailFast(System.String, System.Exception)\r\n   at System.Management.Automation.Diagnostics.Assert(Boolean, System.String, System.String)\r\n   at System.Management.Automation.Diagnostics.Assert(Boolean, System.String)\r\n   at Microsoft.PowerShell.Commands.NewServiceCommand.BeginProcessing()\r\n   at System.Management.Automation.Cmdlet.DoBeginProcessing()\r\n   at System.Management.Automation.CommandProcessorBase.DoBegin()\r\n   at System.Management.Automation.CommandProcessor.DoBegin()\r\n   at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean)\r\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)\r\n   at System.Management.Automation.PipelineOps.InvokePipeline(System.Object, Boolean, System.Management.Automation.CommandParameterInternal[][], System.Management.Automation.Language.CommandBaseAst[], System.Management.Automation.CommandRedirection[][], System.Management.Automation.Language.FunctionContext)\r\n   at System.Management.Automation.Interpreter.ActionCallInstruction`6[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)\r\n   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(System.Action`1\u003cSystem.Management.Automation.Language.FunctionContext\u003e, System.Object, System.Object)\r\n   at System.Management.Automation.DlrScriptCommandProcessor.Complete()\r\n   at System.Management.Automation.CommandProcessorBase.DoComplete()\r\n   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)\r\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)\r\n   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()\r\n   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()\r\n   at System.Threading.Thread.ThreadMain_ThreadStart()\r\n   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nName                           Value\r\n----                           -----\r\nPSVersion                      6.0.0-beta\r\nPSEdition                      Core\r\nGitCommitId                    v6.0.0-beta.6-43-g2761c3ff210caf7a9c18968c03c18c6921046251\r\nOS                             Microsoft Windows 10.0.15063\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\r\n\r\n```\r\n\r\nRef #4785 ([comment](https://github.com/PowerShell/PowerShell/pull/4785#discussion_r137960812))","author":{"url":"https://github.com/markekraus","@type":"Person","name":"markekraus"},"datePublished":"2017-09-10T22:05:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/4803/PowerShell/issues/4803"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d0d01512-251e-0648-9fdb-6fae107b7693
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB8DA:3B01A6:183A08:21B653:6A579DD1
html-safe-nonce185052a82a9311e1b9d40155d195da238d269d0500348101ff441deb7ca9f2a3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOERBOjNCMDFBNjoxODNBMDg6MjFCNjUzOjZBNTc5REQxIiwidmlzaXRvcl9pZCI6Ijg4ODQ5MTEyMjUzOTE1MjEyMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccc657e1b1e9a2be86f5e1784ccdaffc7690a6a8190a4e86797e16f5f6559957c
hovercard-subject-tagissue:256543875
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/PowerShell/PowerShell/4803/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b7898d85a596cde9ceeeff0eae2dba2e6a8de39f49573647036df1e7ed0f5014/PowerShell/PowerShell/issues/4803
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b7898d85a596cde9ceeeff0eae2dba2e6a8de39f49573647036df1e7ed0f5014/PowerShell/PowerShell/issues/4803
og:image:altNote: The test case @{name = 'badstarttype'; parameter = "StartupType"; value = "System"} from test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests.ps1 failed in daily test run...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkekraus
hostnamegithub.com
expected-hostnamegithub.com
None017a07c29bdd8a37b5907fc9a689338deb7103b5af7f56714193b2700229b3df
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
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
release0dd6847d644323df8f8c1368c065f9f630095e3b
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/4803#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F4803
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2FPowerShell%2FPowerShell%2Fissues%2F4803
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=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/4803
Reloadhttps://github.com/PowerShell/PowerShell/issues/4803
Reloadhttps://github.com/PowerShell/PowerShell/issues/4803
Please reload this pagehttps://github.com/PowerShell/PowerShell/issues/4803
PowerShell https://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Fork 8.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Star 54.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Code https://github.com/PowerShell/PowerShell
Issues 1.2k https://github.com/PowerShell/PowerShell/issues
Pull requests 288 https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality 3 https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Code https://github.com/PowerShell/PowerShell
Issues https://github.com/PowerShell/PowerShell/issues
Pull requests https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
New-Service Should Throw on System StartupTypehttps://github.com/PowerShell/PowerShell/issues/4803#top
https://github.com/SteveL-MSFT
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets-Management%22
https://github.com/markekraus
markekraushttps://github.com/markekraus
on Sep 10, 2017https://github.com/PowerShell/PowerShell/issues/4803#issue-256543875
#4785https://github.com/PowerShell/PowerShell/pull/4785
commenthttps://github.com/PowerShell/PowerShell/pull/4785#discussion_r137960812
SteveL-MSFThttps://github.com/SteveL-MSFT
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets-Management%22
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.