WSH Question? 
Author Message
 WSH Question?

How do I use WSH to determine or calculate the
uptime on all my NT4.0 Servers in a domain?

Any replies would be greatly apprciated.

Thanks!
Vinod



Tue, 02 Sep 2003 03:54:34 GMT  
 WSH Question?
I don't know how to do this with pure WSH or WMI, but in the NT4 or W2K
resource kit there's a uptime.exe which does what you're looking for.


Quote:
> How do I use WSH to determine or calculate the
> uptime on all my NT4.0 Servers in a domain?

> Any replies would be greatly apprciated.

> Thanks!
> Vinod



Tue, 02 Sep 2003 06:02:15 GMT  
 WSH Question?
the simplest solution is to get the date of the pagefile.sys on each server
you could use wmi's Win32_OperatingSystem 's lastbootuptime but I do not think
it's worth it.

bruno

Quote:
-----Original Message-----
I don't know how to do this with pure WSH or WMI, but in the NT4 or W2K
resource kit there's a uptime.exe which does what you're looking for.



> How do I use WSH to determine or calculate the
> uptime on all my NT4.0 Servers in a domain?

> Any replies would be greatly apprciated.

> Thanks!
> Vinod

.



Tue, 02 Sep 2003 18:21:27 GMT  
 WSH Question?
I guess I was not very precise when talking about date, so here is some code

set fso = wscript.createobject("scripting.filesystemobject")
set myfile = fso.getfile("c:\pagefile.sys")
lmod = myfile.datelastmodified
wscript.echo Datediff("h", lmod, now)

bruno

Quote:
-----Original Message-----

I don't know how to do this with pure WSH or WMI, but in the NT4 or W2K
resource kit there's a uptime.exe which does what you're looking for.



> How do I use WSH to determine or calculate the
> uptime on all my NT4.0 Servers in a domain?

> Any replies would be greatly apprciated.

> Thanks!
> Vinod

.



Tue, 02 Sep 2003 18:36:05 GMT  
 WSH Question?
You Can use "uptime.exe" file from Windows Resource Kit


I guess I was not very precise when talking about date, so here is some code

set fso = wscript.createobject("scripting.filesystemobject")
set myfile = fso.getfile("c:\pagefile.sys")
lmod = myfile.datelastmodified
wscript.echo Datediff("h", lmod, now)

bruno

Quote:
-----Original Message-----

I don't know how to do this with pure WSH or WMI, but in the NT4 or W2K
resource kit there's a uptime.exe which does what you're looking for.



> How do I use WSH to determine or calculate the
> uptime on all my NT4.0 Servers in a domain?

> Any replies would be greatly apprciated.

> Thanks!
> Vinod

.



Fri, 05 Sep 2003 22:01:04 GMT  
 WSH Question?
You can use "uptime.exe" file from Win Resource Kit

Quote:
> I don't know how to do this with pure WSH or WMI, but in the NT4 or W2K
> resource kit there's a uptime.exe which does what you're looking for.



> > How do I use WSH to determine or calculate the
> > uptime on all my NT4.0 Servers in a domain?

> > Any replies would be greatly apprciated.

> > Thanks!
> > Vinod



Fri, 05 Sep 2003 22:02:15 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Newbie WSH question Network mappings

2. WSH question

3. Difficult Active Directory - WSH Question!

4. Quick WSH Question

5. WSH Question

6. COM / WSH question...

7. Two WSH questions

8. WSH question for the NT guys

9. Very simple WSH question

10. Not exactly a WSH question but...

11. WSH question

12. Remote WSH Question (about errors)

 

 
Powered by phpBB® Forum Software