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:

  • 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
  • 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
  • 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
  • Initiating SCCM Actions with Verification The latest script I am writing requires me to initiate both a software updates scan cycle and a software updates deployment evaluation cycle before continuing with the script. The actions needed to be completed before the s… Read More
  • 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

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