LoginSignup
2
2

More than 3 years have passed since last update.

PowerShell ドライブ関連コマンド

Last updated at Posted at 2019-07-01

【ドライブ関連コマンド】

 New-PSDrive  :ドライブの新規マウント
 Remove-PSDrive:ドライブのマウント解除
 Get-PSDrive  :全ドライブの表示

New-PSDrive

 New-PSDrive -Name <ドライブレター> -PSProvider FileSystem -root <マウントディレクトリ> 
例:DドライブにCドライブのtestdirディレクトリをマウントさせる。
 New-PSDrive -Name D -PSProvider FileSystem -root C:\testdir

Remove-PSDrive

Remove-PSDrive <ドライブレター>
例:Dドライブのマウントを解除する。
Remove-PSDrive D

Get-PSDrive

Get-PSDrive

Get-PSDrive.png

【注意事項】

 New-PSDriveにてマウントしたドライブがエクスプローラ上では表示されないことがあり、またその逆でエクスプローラ上でマウントしたドライブがPowerShell上で使用できない場合もある点に注意。
PSDrive2.png

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2