cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
d_i_saunders
Engaged Sweeper III
We have started deploying this out network.. We have just started seeing a problem..

Our Domain in world wide.

My users can travel from the UK to any part of the world and log on.. As they do the logon script or GPO will run.
The client pc is added to lansweeper.
Everything is good...

Apart form if they log on in any other part of the world.

The none UK pc is then registered with lansweeper and it gets scanned.. (works fine) But its agiant policy for admins from one zone to be doing this on another markets pc's.

GPO and scripts are not my area, but is there away to only apply the GPO when in the UK?
Or apply it to the Machine via GPO?

Or should I just delete them every.. Get the SQL server to delete them once a week..

Thanks in advance.
7 REPLIES 7
Hemoco
Lansweeper Alumni
I don't think you can use a wildcard but you can use the "instr" function of vbscript.
d_i_saunders
Engaged Sweeper III
thanks for the reply. The reason I was looking at using gpo was the ability to deploy a site at a time. This was I can limit the impact.

Will a wild card work as I have said?

I can call lansweeper from the uk logon script. However next logon all pcs will try be scanned. I like the way I can control it with a gpo.

DGoodwin
Engaged Sweeper
You could make the client logon with a vbs script, based on the name of the local computer. If the pc's name begins with UK, then run the UK version... however, it'll still run from any of your other sites.

lansweeper.vbs

Set WshShell = CreateObject("Wscript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")

if left(WshNetwork.ComputerName,2) = "UK" then
WshShell.Run"\\server\share\lsclient ukserver",1, true
elseif left(WshNetwork.ComputerName,2) = "US" then
WshShell.Run"\\server\share\lsclient usserver",1, true
elseif left(WshNetwork.ComputerName,2) = "BR" then
WshShell.Run"\\server\share\lsclient brserver",1, true
elseif left(WshNetwork.ComputerName,2) = "FR" then
WshShell.Run"\\server\share\lsclient frserver",1, true
end if


or you could do it based on the variable for logon server in the windows command "set"..

d_i_saunders
Engaged Sweeper III
Ok.. i have adeed this.. .there are 61 sites UK-SITENAME

in the script could i use a wildcard like:

if site = "uk*" then
lsclient servername
end if

Or cant i use wild cards in the script?
Hemoco
Lansweeper Alumni
What you are refering to are the OU's.
You need to open the "Active directory sites & services" mmc console.
d_i_saunders
Engaged Sweeper III
Thanks for the reply...
From What Iremeber I belibe its devided up as:

MyDomain----> Organsation ---> ZoneEUR/ ZoneAMS /ZoneAOA --------> Country (UK/France etc) ------> Users&Groups ---> [named users]
So the fully qulified object reads as:

MyDomain.com/Organizations/EUR/UK-Ireland/Users and Groups/UK-MysiteA-Site/UKperson

Where do i need to look for the UK site?

Thanks
Hemoco
Lansweeper Alumni
In Active directory there is a concept called "Site", these are mostly different subnets.

What you could do in your script is (pseudocode)

if site = "uk" then
lsclient servername
end if


If the user is outside your subnet, the pc won't be scanned