用 Format-Volume 命令格式化 U 盘
用 PowerShell 把 U 盘、SD 卡格式化成 exFAT、FAT32 或 NTFS,可写进脚本批量处理,比图形界面更快。
以管理员身份执行 Format-Volume -DriveLetter E -FileSystem exFAT -NewFileSystemLabel "USB64",按需要替换盘符和文件系统。
01命令
命令
$ Format-Volume -DriveLetter E -FileSystem exFAT -NewFileSystemLabel "USB64"02作用说明
Format-Volume 相当于右键"格式化"的命令行版本,所有选项都是参数:-FileSystem 选文件系统,exFAT 支持大文件且 Windows/Mac 通用,FAT32 兼容性最好但单文件不能超过 4GB,NTFS 仅 Windows 且支持权限。加 -Full 会逐扇区完整格式化并校验,加 -Force 可以强制格式化有内容挂载的卷。动手前用 Get-Volume 确认盘符。
03风险
!注意: 格式化会立即清空整个分区,没有任何确认提示。插着多个 U 盘时务必核对盘符,选错了数据无法恢复。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Format-Volume依据: Format-Volume formats a volume selected by -DriveLetter with a chosen -FileSystem (exFAT, FAT32, NTFS, ReFS) and optional label.
最后验证: 2026-09-18 · 分类: 文件与文件夹