Hi.
I'm doing more and more with powershell (because of our exchange environment) and less and less with VBscript but it seems like there are things that VBScript can do that powershell either can't, or can't do easily.
I'm fudging up a "createuser.ps1" (just to learn how PS works mostly) and I got the microsoft powershell scripting guide and I've googled all over the place. I was hoping someone had a quick how to.
This is a part of my script...
there is a bunch of stuff above this
#profile
$objUser.put("profilePath", "\\VMFPS001\profile$\"+$userid)
$objUser.put("scriptPath", "vmlogon.vbs")
$objUser.put("homeDirectory", "\\VMFPS001\home$\"+$userid)
$objUser.put("homeDrive", "Z:")
#$objUser.setInfo()
#account
$objUser.put("UserPrincipalName", $userid+"@qcl.lan")
#$objUser.setInfo()
There is a bunch of stuff below this but you get the idea.
I used ADSIEdit to get most of the field names but I simply cannot find the field for terminalservicesprofilepath
With VBscript, its actually only a few lines after you bind
tspath="\\XEN001\"& LogonName & "$"
Set objUser = GetObject("LDAP://cn=" & _
FullName & "," & dcroot)
objUser.TerminalServicesProfilePath = tspath
objUser.SetInfo
Is there a quick fix for this? Scripting Guys stuff is way to complicated. Thanks in advance.
