天极Yesky
  • 笔记本电脑
    笔记本
  • 台式电脑
    台式机
  • 手机
    手机
  • 电脑硬件DIY
    DIY硬件
  • CPU
    主板
    音箱
  • 硬盘
    显卡
    键鼠
  • 内存光驱
    显示器
    机箱电源

  • 数码相机DC
    数码相机
  • MP3播放器
    MP3/MP4
  • 数码摄像机DV
    摄像机
  • 电脑外设
    外设
  • 网络
    网络
  • 服务器
    服务器
  • 数字家庭
    数字家庭
  • 群乐
    群乐
  • 产品报价 行情 商家 新闻 评测 | 软件 设计 网页 开发 安全 论坛 E时代 游戏 图片 壁纸 下载 网摘 博客 索尼专区 Vista 科技奥运
    天极网
    Script for remote synchronization of workstation's time with PDC
    作者: Christine Polewarczyk
    出处:
    责任编辑:
    [ 2004-06-17 19:28 ]


    Here's a small batch file that allows an administrator to remotely synchronize a workstation's time with the PDC (primary domain controller) as the defualt domain user doesn't have the right to sync the time of the PC.

    To sync the workstation time with the PDC, the admin will need to copy the small batch file FixTime.bat from below. Also, he or she will need the utility PsExec.exe from Sysinternals.com.

    The contents of the batch file are as follows:

    ===FixTime.bat===

    @echo on
    If .%1==. goto syntax

    rem
    rem Replace with the name of the domain.
    rem

    psexec %1 net time //domain: //set //y

    goto end

    :syntax

    echo.
    echo.
    echo * Invaild Argument *
    echo.
    echo.
    echo Syntax :
    echo Fixtime MachineName
    echo.
    echo.
    goto end


    :end
    ==========================

    This batch file needs to be executed from the same directory as the PsExec.exe or you can copy psexec.exe to a folder in the PATH variable so that it can be executed from any place. Also, the batch file takes into account that the net.exe and net1.exe files are available in the path variable of the remote PC.

    Thats it. Just type:

    Fixtime

    And the machine's time will be synced with the PDC/BDC (backup domain controller) of the domain.

    Note:- As this command needs Admin privilege to execute, you will need to execute this batch file while logged on as a domain admin on your PC. Code:
    笔名:
    请您注意:

     遵守国家有关法律、法规,尊重网上道德,承担一切因您的行为而直接或间接引起的法律责任。

     天极网拥有管理笔名和留言的一切权利。
    相关内容