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"

Related Posts:

  • Configure PowerShell Settings Recently, we needed to start building select machines off of our domain for special projects. This meant that group policies would not be applied. I use GPOs to set PowerShell settings on all of the machines. With these mac… Read More
  • NIC Power Management Properties I wrote and published a script that enabled wake on lan two years ago. Since then, I have needed to write new scripts to modify the advanced tab of the NIC properties. I began by looking at my old script to see about adding… Read More
  • Install Dell Command Update and Flash BIOS in WinPE I have wanted to get the process of flashing the BIOS into the WinPE environment for quite a while. With the help of Sapien's PowerShell Studio, I finally wrote the script to make this possible. The purpose is that it can f… Read More
  • Apple QuickTime Uninstaller As we have all seen recently, it is time we get rid of Apple QuickTime from PCs as they are no longer going to update the software. I had a few ask me to publish a blanket uninstaller for QuickTime. With the help of Sapien'… Read More
  • NIC Advanced Properties Recently, we started having issues with our new Dell Latitude E7450 laptops. They would be put to sleep and then they could not restore the network connection once the laptop was docked again. The problem came from the Ener… Read More

1 comments:

  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.

    ReplyDelete