Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Wednesday, May 26, 2010

Can you use %username% with mapping a drive location with GPO preferences?

First off, I need to point something out. If all of you remember, I was not able to get my Vista to accept my GPO preferences. That is because I needed to install a new set of client-side extensions (CSEs). Once I tried out this problem on my Windows 7 VMs, no problem. You can get the Vista and XP CSEs here:

Windows Vista (x86): http://go.microsoft.com/fwlink/?LinkId=11185

Windows Vista (x64):http://go.microsoft.com/fwlink/?LinkID=111857

Windows XP (x86): http://go.microsoft.com/fwlink/?LinkId=111851

Windows XP (x64): http://go.microsoft.com/fwlink/?LinkId=111862

You will also need to install XMLLite on your XP SP2 or later machines.

http://go.microsoft.com/fwlink/?LinkId=111843

OK, now on to the question. The answer is yes you can. I did find a condition did exist though. The folder with the users name must already exist in share on the network drive you are mapping to. Having to make all those extra folders manually totally goes against my business 2.0 attitude. You could write a script, but that would take effort. In the User preferences of that same GPO, is the Folder option. Using this option I created a new folder at location \\ServerName\ShareName\%UserName%. This time the mapped drive worked.

No comments: