Powershell not working to disable Windows Update












0















I have been using the command: sc.exe config wuauserv start=disabled on Powershell to disable Windows Updates in Windows 10. But I am unable to do so today after recent Windows Update.



This is the message I am getting using above sc.exe command.
[SC] OpenService FAILED 5:



Access is denied.



Please suggest how can i fix this.










share|improve this question


















  • 1





    Did you run that command in powershell with administrator privilege?

    – Biswapriyo
    Jan 11 at 8:19











  • yes powershell is in administrator mode.

    – Karan
    Jan 11 at 10:14











  • My batch script for cmd prompt still works on 1809 and latest updates.

    – Moab
    Jan 11 at 14:18
















0















I have been using the command: sc.exe config wuauserv start=disabled on Powershell to disable Windows Updates in Windows 10. But I am unable to do so today after recent Windows Update.



This is the message I am getting using above sc.exe command.
[SC] OpenService FAILED 5:



Access is denied.



Please suggest how can i fix this.










share|improve this question


















  • 1





    Did you run that command in powershell with administrator privilege?

    – Biswapriyo
    Jan 11 at 8:19











  • yes powershell is in administrator mode.

    – Karan
    Jan 11 at 10:14











  • My batch script for cmd prompt still works on 1809 and latest updates.

    – Moab
    Jan 11 at 14:18














0












0








0








I have been using the command: sc.exe config wuauserv start=disabled on Powershell to disable Windows Updates in Windows 10. But I am unable to do so today after recent Windows Update.



This is the message I am getting using above sc.exe command.
[SC] OpenService FAILED 5:



Access is denied.



Please suggest how can i fix this.










share|improve this question














I have been using the command: sc.exe config wuauserv start=disabled on Powershell to disable Windows Updates in Windows 10. But I am unable to do so today after recent Windows Update.



This is the message I am getting using above sc.exe command.
[SC] OpenService FAILED 5:



Access is denied.



Please suggest how can i fix this.







windows windows-10 powershell






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 11 at 7:52









KaranKaran

1




1








  • 1





    Did you run that command in powershell with administrator privilege?

    – Biswapriyo
    Jan 11 at 8:19











  • yes powershell is in administrator mode.

    – Karan
    Jan 11 at 10:14











  • My batch script for cmd prompt still works on 1809 and latest updates.

    – Moab
    Jan 11 at 14:18














  • 1





    Did you run that command in powershell with administrator privilege?

    – Biswapriyo
    Jan 11 at 8:19











  • yes powershell is in administrator mode.

    – Karan
    Jan 11 at 10:14











  • My batch script for cmd prompt still works on 1809 and latest updates.

    – Moab
    Jan 11 at 14:18








1




1





Did you run that command in powershell with administrator privilege?

– Biswapriyo
Jan 11 at 8:19





Did you run that command in powershell with administrator privilege?

– Biswapriyo
Jan 11 at 8:19













yes powershell is in administrator mode.

– Karan
Jan 11 at 10:14





yes powershell is in administrator mode.

– Karan
Jan 11 at 10:14













My batch script for cmd prompt still works on 1809 and latest updates.

– Moab
Jan 11 at 14:18





My batch script for cmd prompt still works on 1809 and latest updates.

– Moab
Jan 11 at 14:18










1 Answer
1






active

oldest

votes


















0














Please be sure to spend the time to get spun up on PowerShell using all the no cost online training (YouTube, Microsoft Virtual Academy, MS Channel9, etc.) and no cost eBooks, and the pick up some of the highly recommended PS books via Amazon.



As for what you are doing, this is not the way to run external exe in the PS console host or ISE or VSCode.



Exe's run in cmd.exe not in PS. Calling and exe in PS needs shell to cmd.exe, but you have to do that in code.



PowerShell has special characters that are reserved. The '=' is an assignment operator, so that straight cmd.exe like command cannot be used directly. How to run exe via PS is fully documented.



PowerShell: Running Executables



PowerShell - Special Characters And Tokens



There are several different methods for running executables as well as invoking code. How do you know which one to use for the job? Here is an outline of the methods with examples and general use.



# Your - sc.exe config wuauserv start=disabled
# becomes like this...
# Start and external process calling sc.exe and pass the arguments to SC.exe
Start-Process -FilePath sc.exe -ArgumentList 'config wuauserv start=disabled'





share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393065%2fpowershell-not-working-to-disable-windows-update%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Please be sure to spend the time to get spun up on PowerShell using all the no cost online training (YouTube, Microsoft Virtual Academy, MS Channel9, etc.) and no cost eBooks, and the pick up some of the highly recommended PS books via Amazon.



    As for what you are doing, this is not the way to run external exe in the PS console host or ISE or VSCode.



    Exe's run in cmd.exe not in PS. Calling and exe in PS needs shell to cmd.exe, but you have to do that in code.



    PowerShell has special characters that are reserved. The '=' is an assignment operator, so that straight cmd.exe like command cannot be used directly. How to run exe via PS is fully documented.



    PowerShell: Running Executables



    PowerShell - Special Characters And Tokens



    There are several different methods for running executables as well as invoking code. How do you know which one to use for the job? Here is an outline of the methods with examples and general use.



    # Your - sc.exe config wuauserv start=disabled
    # becomes like this...
    # Start and external process calling sc.exe and pass the arguments to SC.exe
    Start-Process -FilePath sc.exe -ArgumentList 'config wuauserv start=disabled'





    share|improve this answer






























      0














      Please be sure to spend the time to get spun up on PowerShell using all the no cost online training (YouTube, Microsoft Virtual Academy, MS Channel9, etc.) and no cost eBooks, and the pick up some of the highly recommended PS books via Amazon.



      As for what you are doing, this is not the way to run external exe in the PS console host or ISE or VSCode.



      Exe's run in cmd.exe not in PS. Calling and exe in PS needs shell to cmd.exe, but you have to do that in code.



      PowerShell has special characters that are reserved. The '=' is an assignment operator, so that straight cmd.exe like command cannot be used directly. How to run exe via PS is fully documented.



      PowerShell: Running Executables



      PowerShell - Special Characters And Tokens



      There are several different methods for running executables as well as invoking code. How do you know which one to use for the job? Here is an outline of the methods with examples and general use.



      # Your - sc.exe config wuauserv start=disabled
      # becomes like this...
      # Start and external process calling sc.exe and pass the arguments to SC.exe
      Start-Process -FilePath sc.exe -ArgumentList 'config wuauserv start=disabled'





      share|improve this answer




























        0












        0








        0







        Please be sure to spend the time to get spun up on PowerShell using all the no cost online training (YouTube, Microsoft Virtual Academy, MS Channel9, etc.) and no cost eBooks, and the pick up some of the highly recommended PS books via Amazon.



        As for what you are doing, this is not the way to run external exe in the PS console host or ISE or VSCode.



        Exe's run in cmd.exe not in PS. Calling and exe in PS needs shell to cmd.exe, but you have to do that in code.



        PowerShell has special characters that are reserved. The '=' is an assignment operator, so that straight cmd.exe like command cannot be used directly. How to run exe via PS is fully documented.



        PowerShell: Running Executables



        PowerShell - Special Characters And Tokens



        There are several different methods for running executables as well as invoking code. How do you know which one to use for the job? Here is an outline of the methods with examples and general use.



        # Your - sc.exe config wuauserv start=disabled
        # becomes like this...
        # Start and external process calling sc.exe and pass the arguments to SC.exe
        Start-Process -FilePath sc.exe -ArgumentList 'config wuauserv start=disabled'





        share|improve this answer















        Please be sure to spend the time to get spun up on PowerShell using all the no cost online training (YouTube, Microsoft Virtual Academy, MS Channel9, etc.) and no cost eBooks, and the pick up some of the highly recommended PS books via Amazon.



        As for what you are doing, this is not the way to run external exe in the PS console host or ISE or VSCode.



        Exe's run in cmd.exe not in PS. Calling and exe in PS needs shell to cmd.exe, but you have to do that in code.



        PowerShell has special characters that are reserved. The '=' is an assignment operator, so that straight cmd.exe like command cannot be used directly. How to run exe via PS is fully documented.



        PowerShell: Running Executables



        PowerShell - Special Characters And Tokens



        There are several different methods for running executables as well as invoking code. How do you know which one to use for the job? Here is an outline of the methods with examples and general use.



        # Your - sc.exe config wuauserv start=disabled
        # becomes like this...
        # Start and external process calling sc.exe and pass the arguments to SC.exe
        Start-Process -FilePath sc.exe -ArgumentList 'config wuauserv start=disabled'






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 12 at 1:47

























        answered Jan 12 at 1:42









        postanotepostanote

        1,04333




        1,04333






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393065%2fpowershell-not-working-to-disable-windows-update%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Сан-Квентин

            8-я гвардейская общевойсковая армия

            Алькесар