gpt4 book ai didi

windows - Powershell 获取所有光驱盘符

转载 作者:可可西里 更新时间:2023-11-01 11:25:22 24 4
gpt4 key购买 nike

我正在尝试使用 Powershell 获取 Windows 系统的所有驱动器盘符,但我无法弄清楚。有任何想法吗?

我尝试使用 Get-Volume,但它没有用于 -ByDriveType-ByType-Type 的参数 或任何东西。

最佳答案

如果您只想要光驱(如标题中所述),请使用:

Get-CimInstance Win32_LogicalDisk | ?{ $_.DriveType -eq 5} | select DeviceID

关于windows - Powershell 获取所有光驱盘符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40279135/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com