# DFU Mode Trigger / Force via PowerShell

**URL:** https://community.particle.io/t/dfu-mode-trigger-force-via-powershell/44330
**Category:** Project Share
**Created:** [October 4, 2018, 2:18am UTC](https://community.particle.io/t/dfu-mode-trigger-force-via-powershell/44330 "2018-10-04T02:18:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AJBarry](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ajbarry/32/24090_2.png) [@AJBarry](https://community.particle.io/u/AJBarry)
#### Post date: [October 4, 2018, 2:18am UTC](https://community.particle.io/t/dfu-mode-trigger-force-via-powershell/44330/1 "2018-10-04T02:18:02Z")

</div>

Just a super quick share here, but for those using Windows/PowerShell environments I wrote a little script to force a Particle device into DFU mode via serial connect at baud 14400.

```auto
$scom = [System.IO.Ports.SerialPort]::getportnames()
$port = new-Object System.IO.Ports.SerialPort $scom,14400,None,8,one
$port.open()
$port.close()

```

Connect via USB and run the following in a powershell window (or save it in a goToDFU.ps1 script if you’d like)

Quicker and easier than using the buttons!

---

<div class="post-metadata">

### Author: ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)
#### Post date: [October 4, 2018, 5:59am UTC](https://community.particle.io/t/dfu-mode-trigger-force-via-powershell/44330/2 "2018-10-04T05:59:10Z")

</div>

Alternatively you could just use the `mode` command `mode COMx 14400` which works in both PowerShell and CMD

---

<div class="post-metadata">

### Author: ![AJBarry](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ajbarry/32/24090_2.png) [@AJBarry](https://community.particle.io/u/AJBarry)
#### Post date: [October 4, 2018, 6:42am UTC](https://community.particle.io/t/dfu-mode-trigger-force-via-powershell/44330/3 "2018-10-04T06:42:30Z")

</div>

Well that certainly is simpler!

I guess the only advantage of the PS script is it grabbing the COM for you.

Thanks ScruffR!
