Link to home
Start Free TrialLog in
Avatar of psionnist
psionnist

asked on

Join a domain over vpn...

Hi!
I'm deploying a domain in a company, 30 users, many of them are connected through VPN.
I need them to join the domain, remotely.
I'm using a script to join the domain, after the vpn connection is established. I also have a gpo that will make "power User" every member of the domain.
The problem comes when they reboot, since the VPN Connection is lost, it's impossible to log in. The VPN is based on a Sonic Wall, the only way to establish the connection is to connect with a web browser.
So I wonder if there is a way, using another script or completing the one I use, to add directly the concerned user, who could log in even if the domain is unavalible.

Sorry for my poor english... I'm practicing as much as possible...
Antoine

the script beeing used:

the script beeing used:
Const JOIN_DOMAIN             = 1
Const ACCT_CREATE             = 2
Const ACCT_DELETE             = 4
Const WIN9X_UPGRADE           = 16
Const DOMAIN_JOIN_IF_JOINED   = 32
Const JOIN_UNSECURE           = 64
Const MACHINE_PASSWORD_PASSED = 128
Const DEFERRED_SPN_SET        = 256
Const INSTALL_INVOCATION      = 262144
 
strDomain   = "domain.local"
strPassword = "password"
strUser     = "administrateur"
 
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
 
Set objComputer = _
    GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
    strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" _
    & strComputer & "'")
 
ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
    strPassword, _
    strDomain & "\" & strUser, _
    NULL, _
    JOIN_DOMAIN + ACCT_CREATE)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rob Williams
Rob Williams
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of psionnist
psionnist

ASKER

i had thought about this way... but thank you for your answer!
Thanks psionnist.
Cheers !
--Rob