# Disable Startup via powershell

**URL:** <https://forums.powershell.org/t/disable-startup-via-powershell/8404>\
**Category:** PowerShell Help\
**Created:** [April 10, 2017, 7:48am UTC](https://forums.powershell.org/t/disable-startup-via-powershell/8404 "2017-04-10T07:48:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertuu85](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@ertuu85](https://forums.powershell.org/u/ertuu85)\
**Post date:** [April 10, 2017, 7:48am UTC](https://forums.powershell.org/t/disable-startup-via-powershell/8404/1 "2017-04-10T07:48:47Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![sam-boutros](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/sam-boutros/32/5_2.png) [@sam-boutros](https://forums.powershell.org/u/sam-boutros)\
**Post date:** [April 10, 2017, 8:53am UTC](https://forums.powershell.org/t/disable-startup-via-powershell/8404/2 "2017-04-10T08:53:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ertuu85](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@ertuu85](https://forums.powershell.org/u/ertuu85)\
**Post date:** [April 10, 2017, 10:34am UTC](https://forums.powershell.org/t/disable-startup-via-powershell/8404/3 "2017-04-10T10:34:40Z")

</div>

That does it! Thanks Sam

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:39pm UTC](https://forums.powershell.org/t/disable-startup-via-powershell/8404/4 "2024-05-16T20:39:27Z")

</div>

Closed on May 16, 2024, 8:39pm UTC


