Jump to content

Recommended Posts

Posted

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.

Posted

I use a Powershell startup script:

 

$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.

Posted

The following PowerShell script will do what you want.

 

$AD = [ADSISearcher]"(samaccountname=$env:USERNAME)"
$FirstName = $AD.FindOne().Properties.givenname

(New-Object -ComObject Shell.Application).NameSpace('H:').Self.Name="$FirstName"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...