On-demand GlobalProtect and Mapped drives

Showing results for 
Show  only  | Search instead for 
Did you mean: 

On-demand GlobalProtect and Mapped drives

L3 Networker

Hello all ,


Having issues with some users where they have mapped drives but after they connect to global protect they don't work.


If they unmap and they map again it works .

When doesn't work after connecting to globalprotect if they ping the IP of the server that they have the mapped drive it works but SMB it doesn't .



We have on-demand globalprotect, SSO disabled of course and we allow netbios, SMB and I don't see any blocked traffic.

I have tried to search that and I don't want to say to the customer to fix that with scripts net use because all users are using their own shared folders.




@Jason.Holcomb would you mind posting the content of that .vbs-file, or at least describe what you meant with "that will pull the home drive mapping info from AD".


I think we might need to do something similar.

We have file called Map_Home_Drive.vbs which is installed on all the machines that the registry points to. In AD we have the home drive mapped (I am not the AD admin so I am not sure which field they populated but I know the drive is mapped in there)


'--- START

DIM strHomeDrive, strRemoteShare

SET objFileSys = CreateObject( "Scripting.FileSystemObject" )
SET objNetwork = CreateObject( "WScript.Network" )

'--- Wait a short time to connect to the network
WScript.Sleep( 15000 )

'--- Get Active Directory information
SET objSysInfo = CreateObject( "ADSystemInfo" )
SET objUser = GetObject( "LDAP://" & objSysInfo.UserName )

strHomeDrive = objUser.HomeDrive
strHomeShare = objUser.HomeDirectory

WScript.Echo vbCrLf
WSCript.Echo Now()
WScript.Echo "strHomeDrive: " & strHomeDrive
WScript.Echo "strHomeShare: " & strHomeShare
WScript.Echo vbCrLf

'--- Is strHomeDrive already mapped?
If objFileSys.FolderExists( strHomeDrive ) Then

WScript.Echo vbCrLf
WScript.Echo strHomeDrive & " is already mapped - DONE"


LoopCounter = 1
LoopTotal = 5
bolHomeShareMapped = FALSE

Do While LoopCounter <= LoopTotal

WScript.Echo vbCrLf
WScript.Echo "Mapping home share - attempt " & LoopCounter & " of " & LoopTotal

'--- Check for home share
If objFileSys.FolderExists( strHomeShare ) Then

WScript.Echo "Home share found..."

'--- Map home share if it can be seen
WScript.Echo "Mapping to home share..."
objNetwork.MapNetworkDrive strHomeDrive, strHomeShare, False

'--- Verify home share is mapped
WScript.Sleep( 5000 )

If objFileSys.FolderExists( strHomeDrive ) Then

WScript.Echo "Home share mapped..."
bolHomeShareMapped = TRUE
Exit Do

End If


WScript.Echo "Home share not found...waiting"
WScript.Sleep( 5000 )

End If

LoopCounter = LoopCounter + 1


'--- Report home share status
If bolHomeShareMapped Then
WScript.Echo "Home share mapped"
WScript.Echo "Home share not mapped"
End If

End If

'--- END

“You never fail until you stop trying.”
― Albert Einstein

L2 Linker

Hi George.

Did you get this resolved please? I'm having the same issue.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!