Hi All,
I need to run a command called moveuser (replaces the local profile with the
profile of a new user) using script which is distributed via SMS 2003. The
script needs to be run under the security context of a domain admin. I tried
runas but it didn't work. I believe the problem is that the script runs
under security context of Local System account which is not sufficient for
me. The following is the example of runas which did not work. SMS 2003
reports the the script result as success. No error messages are reported. Is
there anyone who would suggest some other way with an example or tell me
where I'm going wrong?
Regards,
Yaman
Dim WshShell
Set WshShell = WScript.CreateObject ("WSCript.shell")
WshShell.run "runas /user:newdomain\administrator " & """" & "moveuser
olddomain\olduser newdomain\newuser" & """"
WScript.Sleep 100
WshShell.SendKeys "P@ssw0rd~"
WScript.Sleep 100
WshShell.SendKeys "~"