Change the directory path in AD using VBS
How can I change the directory path to all my users in Active Directory (AD) using a login Visual Basic Script (vbs) and how could I distinguish if the user accounts have a local administrative log in?
How can I change the directory path to all my users in Active Directory (AD) using a login Visual Basic Script (vbs) and how could I distinguish if the user accounts have a local administrative log in?
You can change the directory path in the active directory by getting the value of the Wscript shell objects' CurrentDirectory property. You have to note that the current directory property scripts will work well when you are running the windows script host version 5.6.
An example whereby a script has been used to change the current directory to another directory which is C:Windows is as indicated below:
Set objShell = CreateObject("Wscript.Shell")
Wscript.Echo objShell.CurrentDirectory
objShell.CurrentDirectory = "C:Windows"
Wscript.Echo objShell.CurrentDirectory
Â
In the last line of the script, you will note that the script C:Windows will be changed to the current directory after you have run the script.
Regards
Thompson Locker