[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 Nsqs 于 2023-8-28 00:59 编辑

全部
  1. @echo off
  2. powershell -noprofile -executionpolicy bypass "gwmi Win32_LogicalDiskToPartition|select Antecedent,Dependent|%%{$x=$_.Dependent -replace '.+(?:=)|\"';\"$x, $($_.Antecedent -replace '(?:.+=)|\"')\"}"
  3. pause
复制代码
指定盘符
  1. @echo off
  2. powershell -noprofile -executionpolicy bypass "(gwmi Win32_LogicalDiskToPartition|?{$_.Dependent -match 'd:'}).Antecedent -replace '(?:.+=)|\"'"
  3. pause
复制代码

TOP

返回列表