powershell
Thanks!I'm intrigued on your use of the Sysvol share for your profiles?!
Handy little script, i was looking to do something quite similar with a gui and i may have to pilfer some of that![]()
I haven't tested it but that looks exactly right to me.Legend.
If I wanted firstname.lastname as the SAM and lastname, firstname as the DisplayName would I do:
$SAM = $UserFirstname + "." + $UserLastName
$DisplayName = $UserLastName + "," + " " + $UserFirstName
?
Ah that's strange, it's working fine for us on 2013. Do you get an error message?Ah, thanks.
Not working right now as it looks to be a little different with Exchange 2016, you can't just add a PSSnapin anymore.
Might build a home lab and do some experimenting.
The uri is the fully qualified domain name of the exchange server, so if your exchange server was 'srv-exchange' and your domain was 'college.local' then the fqdn would be 'srv-exchange.college.local'https://social.technet.microsoft.co...ade5a82/exchange-2016-snapin?forum=Exch2016PS
It's changed. I don't know what our uri is, or if I do (which I thought I did) the above method isn't working.
The uri is the fully qualified domain name of the exchange server, so if your exchange server was 'srv-exchange' and your domain was 'college.local' then the fqdn would be 'srv-exchange.college.local'
You can sometimes avoid the + thing totally, powershell does let you use vars in strings like this:
$FirstName = "Bill"
$LastName = "Hats"
"$FirstName.$LastName"
"$FirstName, $LastName"