title: PowerShell: "Eject Device" like Windows' "Safely Remove", possible?
body: <p>I want to get the same effect as clicking an &quot;Eject Device&quot; on the &quot;Safely Remove&quot; menu in the Notification Area. Is this possible with PowerShell? I have tried <code>Get-PhysicalDisk</code>, and I could see that PowerShell can get the details of the disk I want to remove. So, I want to do emulate &quot;Eject Device&quot; with the uniquely-identifiable information of that disk (like &quot;Number&quot; or &quot;Serial Number&quot;).</p>
  <p>If this is NOT possible with PowerShell, please tell me that.</p>
  <p>If Microsoft has not exposed any programmatic access to that feature, so this is NOT possible in a reasonable way (other than a really difficult way like reverse-engineering or something), please tell me that, too.</p>
  <p><a href="https://i.stack.imgur.com/9rb18.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9rb18.png" alt="enter image description here" /></a></p>