remote machine time using NET TIME

remya1000

Well-known member
Joined
Mar 29, 2007
Messages
122
Programming Experience
Beginner
i'm using Vb.net.
i need to find out the remote machine's time by using NET TIME.

NET TIME [\\computer | /WORKGROUP:wgname] [/SET] [/YES]

i got this help from internet while searching. but while using this code i'm not able to display the time in my machine in "cmd".

anyidea how can i find the remote machine time using NET TIME. if u have please let me know.

thanks in advace
 
If "Net time \\servername" from command prompt (cmd.exe) don't work for you it won't do you much good in code either. Also it would be better to query WMI for Win32_UTCTime instead of running the cmd process and redirecting standard output and parsing out the string return.
 
Thanks... that worked
i tried this code

net time \\servername

and i'm getting the remote machine's time
and while using this

net time \\servername /set /yes

i can synchronize the remote machine's time too.

thanks a lot.... it worked... thanks.....
 
Back
Top