Disable Startup via powershell

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Aaron Aaron 2 weeks, 1 day ago.

  • Author
    Posts
  • #68418
    Profile photo of Aaron
    Aaron
    Participant

    Is there a way to control the status of startup processes?

    Such as onedrive? It is enabled in our environment but I would like to disable it across the board, I see there is a command

    gcim win32_startupcommand | ? {$_.caption -eq "onedrive"} | fl *
    
    Caption               : OneDrive
    Description           : OneDrive
    SettingID             :
    Command               : "C:\Users\test\AppData\Local\Microsoft\OneDrive\OneDrive.exe" /background
    Location              : HKU\S-1-5-21-2959385896-1550972142-1790183439-6801\SOFTWARE\Microsoft\Windows\CurrentVersion\Ru
                            n
    Name                  : OneDrive
    User                  : domain\user
    UserSID               : S-1-5-21-2959385896-1550972142-1790183439-6801
    PSComputerName        :
    CimClass              : root/cimv2:Win32_StartupCommand
    CimInstanceProperties : {Caption, Description, SettingID, Command...}
    CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties
    
    

    which shows the process, but not a switch like 'enable/disable'

    Any help would be greatly appreciated!

  • #68431
    Profile photo of Sam Boutros
    Sam Boutros
    Participant

    You need to delete that reg key to prevent one drive from starting up..

    • #68439
      Profile photo of Aaron
      Aaron
      Participant

      That does it! Thanks Sam

You must be logged in to reply to this topic.