Find available drive letter with PowerShell


You can findĀ  available drive letter with this oneliner :

Get-ChildItem function:[e-z]: -Name | Where { !(Test-Path $_ )}

This can be useful if you need to automatically map a network share.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.