Disable Startup via powershell

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

  • Author
  • #68418
    Profile photo of Aaron

    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
    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

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

    • #68439
      Profile photo of Aaron

      That does it! Thanks Sam

You must be logged in to reply to this topic.