Special Folders in Powershell

A good start point is the environment variables special powershell drive, aka Env:. However all folders are not available through this mechanism.

You may want to build a hash table to retrieve them all and optionally add a drive to make your code nicer to read. The code is based on the GetNames static method of an enum to retrieve the various names, knowing that the enumeration we are interested in are Environment.SpecialFolder.

So here we go:


Leave a comment

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.