header image

PSTempDrive

Posted by: | March 9, 2019 Comments Off on PSTempDrive |

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

under: PowerShell v6

Comments are closed.

Categories