cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JXB
Engaged Sweeper
Hello everybody.

I am going to run the unlock.vbs with runas.exe as another user but can't get it to work.

What I try is something like that:

runas.exe /profile /env /user:domain\%username%.admin "cscript.exe {actionpath}unlock.vbs {cn}"

Any ideas how to get this working?

Thanks,

Joerg

1 REPLY 1
SouthySuper
Engaged Sweeper III
Our environment may be a little different than yours. We have separate administrative accounts than our user accounts. We open our browsers to use lansweeper as our admin accounts. We also login to lansweeper as our admin accounts. My unlock user action (from user pages) using the unlock.vbs look like this:

{actionpath}unlock.vbs "{cn}"

my unlock.vbs looks like this:

If WScript.Arguments.Count = 1 Then
struser= WScript.Arguments(0)
Set objUser = GetObject("LDAP://" & struser)
objUser.IsAccountLocked = False
objUser.SetInfo
end if