Finding A Users Desktop Folder

by Aug 5, 2010

The .NET Environment class can provide the paths to common folders like a user desktop:

Environment]::GetFolderPath("Desktop")

Use this line to get a list of allowed folder names:

[Enum]::GetNames([System.Environment+SpecialFolder])

Twitter This Tip! ReTweet this Tip!