22 March 2013

Powershell: Public Desktop Environmental Variable

Powershell 3.0 now has a public desktop environmental variable, CommonDesktopDirectory, unlike versions 1 & 2. In order to make the powershell public desktop environmental variable compatible across different versions, use the following line:

  • $desktop = ([Environment]::GetEnvironmentVariable("Public"))+"\Desktop"



  1. This blog is highly informatics, crisp and clear. Here everything has been described in systematic manner so that reader could get maximum information and learn many things. This is one of the best blogs I have read.