Disable Startup via powershell

Welcome Forums General PowerShell Q&A Disable Startup via powershell

This topic contains 2 replies, has 2 voices, and was last updated by

2 years, 3 months ago.

  • Author
  • #68418

    Topics: 21
    Replies: 30
    Points: 0
    Rank: Member

    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

    Topics: 9
    Replies: 387
    Points: 500
    Helping Hand
    Rank: Contributor

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

    • #68439

      Topics: 21
      Replies: 30
      Points: 0
      Rank: Member

      That does it! Thanks Sam

The topic ‘Disable Startup via powershell’ is closed to new replies.