+ Post New Thread
Results 1 to 3 of 3
Windows 8 Thread, rename Pupils Mapped Drive to their first name in Technical; is it possible? I tried adding %firstname% to the mapped drive in GPP but that exactly what it put on ...
  1. #1
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,799
    Thank Post
    215
    Thanked 264 Times in 214 Posts
    Rep Power
    67

    rename Pupils Mapped Drive to their first name

    is it possible? I tried adding %firstname% to the mapped drive in GPP but that exactly what it put on the folder

    I always normally use the %username% and it works, I just thought a first name would be a nice touch.

  2. #2
    Sephiroth's Avatar
    Join Date
    Mar 2009
    Location
    The Ninth Circle
    Posts
    109
    Thank Post
    11
    Thanked 20 Times in 20 Posts
    Rep Power
    22
    I use a Powershell startup script:

    Code:
    $Username=[environment]::UserName
    $sh=New-Object -com Shell.Application
    $sh.NameSpace('H:').Self.Name = "(Home) - $Username"
    Obviously set the last bit to whatever you want to display. I put the home bit at the front as I don't show drive letters (drives me mad that people refer to the 'K' Drive - that means nothing to me on the server!) and the ordering goes by first letter of the name and sends them all over the place.

  3. #3


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,025
    Thank Post
    231
    Thanked 2,699 Times in 1,994 Posts
    Rep Power
    792
    The following PowerShell script will do what you want.

    Code:
    $AD = [ADSISearcher]"(samaccountname=$env:USERNAME)"
    $FirstName = $AD.FindOne().Properties.givenname
    
    (New-Object -ComObject Shell.Application).NameSpace('H:').Self.Name="$FirstName"

SHARE:
+ Post New Thread

Similar Threads

  1. GPP Mapped Drives to Local Directory
    By Michael in forum Windows Server 2008 R2
    Replies: 8
    Last Post: 1st June 2012, 01:09 PM
  2. Replies: 40
    Last Post: 14th March 2012, 08:56 AM
  3. Map drive to internet location
    By Admiral208 in forum How do you do....it?
    Replies: 7
    Last Post: 27th October 2011, 08:34 PM
  4. [Ubuntu] adding mapped drives to ubuntu systems
    By sted in forum *nix
    Replies: 6
    Last Post: 18th March 2011, 05:20 PM
  5. Replies: 16
    Last Post: 22nd September 2010, 03:16 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •