Refresh Newly Mounted Disks

by Jun 18, 2015

If your script has just mounted a new drive, PowerShell may not immediately be able to access it (via Get-ChildItem, for example), because PowerShell did not yet update its drive list.

To update the PowerShell drive list, run this:

$null = Get-PSDrive

Twitter This Tip! ReTweet this Tip!