|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
List User Profile PropertiesHi at all. I'm a new user about scripting....
I need to know the login script name for all my users. Please consider that I'm in an AD named tis.local Serching on scripting site I found the following script but, when I run it, I don't receive any answer. Where is the error? On Error Resume Next _________________________________________________________- Set objUser = GetObject _ ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com") Wscript.Echo "Profile Path: " & objUser.ProfilePath Wscript.Echo "Script Path: " & objUser.ScriptPath Wscript.Echo "Home Directory: " & objUser.HomeDirectory Wscript.Echo "Home Drive: " & objUser.HomeDrive __________________________________________________________ Thank in advance for your cooperation Regrads Gianni (Italy) Gianni wrote:
Show quoteHide quote > Hi at all. I'm a new user about scripting.... The program works for me, if I substitute the Distinguished Name of a user.> I need to know the login script name for all my users. > Please consider that I'm in an AD named tis.local > Serching on scripting site I found the following script but, when I run it, > I don't receive any answer. Where is the error? > On Error Resume Next > _________________________________________________________- > Set objUser = GetObject _ > ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com") > > Wscript.Echo "Profile Path: " & objUser.ProfilePath > Wscript.Echo "Script Path: " & objUser.ScriptPath > Wscript.Echo "Home Directory: " & objUser.HomeDirectory > Wscript.Echo "Home Drive: " & objUser.HomeDrive > __________________________________________________________ > Thank in advance for your cooperation You need to replace: cn=myerken,ou=management,dc=fabrikam,dc=com with the Distinguished Name of a user in your domain. Also, I run a script like this by saving the code in a file with the extension *.vbs, then running it at a command prompt with the cscript host. If the VBScript program is saved in a file called Profile.vbs, I would run it at a command prompt with the following command: cscript Profile.vbs If the Distinguished Name is wrong, or there is a typo, you should get an error message. The error message should indicate which line of the program raised the error.
Write to file multiple times from Powershell
Migration from vbscript to powershell Getting group members of group on Domain A that contains users on Domain B checking for blocked inheritance in a group of users Can't log AD user in PowerShell Search in text files add a local printer ADS_UF_PASSWD_NOTREQD = &h00020 Printer Port Settings |
|||||||||||||||||||||||