6

I tried command like below. But can't see server time.

psexec \\SERVER_NAME -i -u USERNAME -p PWD "C:\WINDOWS\system32\cmd.exe /c time /t"

Or is there any alternative? Thanks.

Stan
  • 37,207
  • 50
  • 124
  • 185

2 Answers2

16
net time \\SERVER_NAME

Ps. This question really belongs at ServerFault.

Anders Abel
  • 67,989
  • 17
  • 150
  • 217
2

I have about 100 servers in my company. Once i had to check system time on all servers. The solution was:

psexec -d -i cmd /c nettime.bat

content of nettime.bat file :

@echo off
net time \\server01 >>c:\1.txt
net time \\server02 >>c:\1.txt
net time \\server03 >>c:\1.txt
Evgeniy
  • 21
  • 1