如何使用PowerShell更改本地磁盘名称?
要使用PowerShell更改本地磁盘名称,我们可以使用Set-Volume命令。例如,我们的驱动器名称为F,其卷标为“新卷”,需要将其更改为“临时存储”,然后我们可以使用其现有的卷名或驱动器号来更改标签。
要使用驱动器号更改卷名,
Set−Volume −DriveLetter 'E' −NewFileSystemLabel 'Temporary Storage'
要使用现有标签进行更改,
Set−Volume −FileSystemLabel 'New Volume' −NewFileSystemLabel 'Temporary Storage'
对于远程系统,我们可以使用Invoke-Command或CIMSession参数。
例如,
$sess = New−CimSession −ComputerName Labmachine2k12 Set−Volume −CimSession $sess −DriveLetter 'E' −NewFileSystemLabel 'Temporary Storage'
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短