开发者

How to check remote server time via psexec

开发者 https://www.devze.com 2022-12-23 01:19 出处:网络
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\"

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.


net time \\SERVER_NAME

Ps. This question really belongs at ServerFault.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消