PowerShell for Windows Admins

Mar 9 2019   6:46AM GMT

PSTempDrive

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tags:
Powershell

The release of PowerShell v6.2 release candidate 1 brings more experimental features including PSTempDrive.

You can view the currently available experimental features using get-ExperimentalFeature.  You’ll find a total of four:

PSCommandNotFoundSuggestion
PSImplicitRemotingBatching
PSTempDrive
PSUseAbbreviationExpansion

Install PSTempDrive using

Enable-ExperimentalFeature –Name PSTempDrive

Restart PowerShell after enabling the feature.

Get-PSDrive will show a new drive named  Temp. The root of the drive is set by the path in your TEMP environmental variable.

You can use and access the TEMP drive like any other drive set by PowerShell.

The TEMP drive follows the pattern of other drives created from a path on an existing drive using the filesystem provider in that the used and free space figures reflect the situation for the whole volume not the individual drives.  The free space is OK like this as theoretically you could consume the whole of the available space on your new drive but the used space should reflect reality.  The C: drive used space should be for the whole volume but the TEMP: drive should only show the space used in your TEMP folder etc.

If you want to remove the experimental feature – use Disable-ExperimentalFeature and restart PowerShell.

Not wholly convinced of the need for this particular feature but it gives marginally easier access to the TEMP folder.

Remember that experimental features are just that – experimental – and could be modified or even removed in a later version of PowerShell

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: