#117582 - 2004-04-08 10:16 PM
Mission impossible?
|
JerDog
Fresh Scripter
Registered: 2003-03-24
Posts: 10
|
Greets all,
Looking to create a login script that does it all, and have found quite a few samples. However, I've got a couple issues that I'm trying to figure out and hope I can get some insight from the experienced peeps out there.
1. Can I script via Kixtart to detect connection speed of workstation logging into the network? I see plenty of examples that differentiate between Dial-Up and LAN/VPN by IP address. However, with the frequency of spoofing that takes place, I don't see this as necessarily accurate. I'm wondering if there is something that can ping the machine, and then interpret the results?
2. Many of our users connenct to our network/domain solely by logging into Citrix servers. What do I need to do to have the script recognize the machine logging into the server, and not the Citrix server itself?
I appreciate any assistance.
Jer
|
|
Top
|
|
|
|
#117583 - 2004-04-08 10:34 PM
Re: Mission impossible?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
required WMIQuery() UDF
Code:
$bwidth = WMIQuery("CurrentBandwidth","Win32_PerfRawData_Tcpip_NetworkInterface") $bname = WMIQuery("name","Win32_PerfRawData_Tcpip_NetworkInterface") if $bname="WAN [PPP_SLIP] Interface" $bwidth=$bwidth/1000+"KB" endif $adname = split($bname,"|") $adapter= split($bwidth,"|") for $loop=0 to ubound($adapter) $adn=$adname[$loop] $adb=$adapter[$loop] if not instr($adn,"Loopback") $speed=val($adb)/1000000 endif next
? " Computer IP is "color c+/n"$ip "color w/n "with a "color w+/n $speed "MB" color w/n " connection"
|
|
Top
|
|
|
|
#117586 - 2004-07-01 06:39 PM
Re: Mission impossible?
|
JerDog
Fresh Scripter
Registered: 2003-03-24
Posts: 10
|
Rad...
Being the newbie that I am, I'm having problems having this script excerpt do anything aside from error out stating Error: expected expression! Line: 0
I'll definitely claim that I do not understand everything inyour script, and am just wondering if there is a formatting issue or am I leaving something out?
Also, do you know if this will recognize cirtix client machines?
Thanks.
jer
|
|
Top
|
|
|
|
#117588 - 2004-07-02 06:17 AM
Re: Mission impossible?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
this will do the speed of the machine it is run on... since the script would typically be running in a citrix env, it would do the speed on the server.
however, if wouldn't be too dificult to code in the client's name and do a remote query against the client machine... assuming the user has permissions to the client machine and it is WMI capable
|
|
Top
|
|
|
|
#117589 - 2004-07-02 06:19 AM
Re: Mission impossible?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
also, the code posted above is from an old version of WMIQuery that would return | delimited strings, which necessitated the split statements. The current version of WMIQuery returns arrays directly
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 657 anonymous users online.
|
|
|