Search found 13729 matches

by jvierra
Wed Dec 19, 2007 3:48 am
Forum: VBScript
Topic: Need help with ADSI script
Replies: 4
Views: 1169

Need help with ADSI script

Assuming that "username" means the pew-win2k logon id of the user then the following will be easier and more concise:

for each user in spreadsheet
Get user object from AD using userid
Set employee id field on user object and save
next user
by jvierra
Tue Dec 18, 2007 8:08 am
Forum: VBScript
Topic: How do I shut down PCs with noone logged in?
Replies: 16
Views: 5669

How do I shut down PCs with noone logged in?

othman - true but the request specifically asked to fin d all worksations in active directory. If you have a constant changing environment this would be the easiest way to get all workstations that are current.

Whichever way suits your need is ok. I was just responding to the initial request.
by jvierra
Tue Dec 18, 2007 7:04 am
Forum: VBScript
Topic: WMI Problem using VBScript
Replies: 5
Views: 1456

WMI Problem using VBScript

The most important part of teh script is missing. Where is the ping function. You can't connect to the remote server WMI to ping. You must use the local WMI class to ping. The code above make very little sense. Here is sample code for a ping: Function TestPingXP( sHostName )      Dim colPings, ping ...
by jvierra
Tue Dec 18, 2007 3:23 am
Forum: VBScript
Topic: How do I shut down PCs with noone logged in?
Replies: 16
Views: 5669

How do I shut down PCs with noone logged in?

othman - unfortuantely t5hat won't work for dmain connected computers and will not show a user on XP and later. YOu need to query all logon sessions for logontype of 2 or 10. If user is connected remotely type will be 10. 2 if at teh console. The user is not filled in in a domain when remote dweskto...
by jvierra
Tue Dec 18, 2007 12:32 am
Forum: Other Scripting Languages
Topic: DLA windows script
Replies: 5
Views: 2602

DLA windows script

The GPO policy template will show you where the registry keys are.
by jvierra
Mon Dec 17, 2007 11:42 pm
Forum: VBScript
Topic: WMI Problem using VBScript
Replies: 5
Views: 1456

WMI Problem using VBScript

It would help if you posted the script so we can see how it is structured.

WMI connection do error out when a machine is missing. YOu r script may be suppressing the error or there may be a logic path that causes this. Only the exact code can help to solve this.
by jvierra
Mon Dec 17, 2007 8:57 am
Forum: VBScript
Topic: Timeout a VBScript?
Replies: 9
Views: 3544

Timeout a VBScript?

Yes - I agree withthat. This and about one hundred other things is why I prefer PowerShell.

For most things admin, though, VBS works just fine. I guess I am more accustomed to avoiding th epiutfalls so I generally don't get caught up in the "gotcha's".

by jvierra
Mon Dec 17, 2007 8:34 am
Forum: VBScript
Topic: Timeout a VBScript?
Replies: 9
Views: 3544

Timeout a VBScript?

Exit code is WScript.Quit n where N is a 32 bit integer. It becomes the return code of the shell.

by jvierra
Mon Dec 17, 2007 7:44 am
Forum: VBScript
Topic: Timeout a VBScript?
Replies: 9
Views: 3544

Timeout a VBScript?

Your right this works. WScript.Echo WScript.Timeout WScript.Timeout = 15 WScript.Echo "Start..." While True     WScript.Sleep 5000     WScript.Echo "Tick..." Wend WScript.Echo "Stop..." Not documented in any of the documentation I have. Yes - you are safe with VBS. It does work very well for most th...
by jvierra
Mon Dec 17, 2007 3:18 am
Forum: VBScript
Topic: Timeout a VBScript?
Replies: 9
Views: 3544

Timeout a VBScript?

You may be right about the security reasoning but I believe that allowing a script to alter the environment of the script engine could be a serious security hole is securing a script. I have done some testing. Using some tricks I was able to modify the setting for the timeout from inside of a script...