إضغط لتفاصيل الإعلانات



Results 1 to 1 of 1
Share
  1. #1
    Join Date
    Nov 2007
    Location
    Arab world!
    Posts
    6,169
    Blog Entries
    4
    Rep Power
    10

    Thumbs up psexec tool to deploy application to servers or execute commands

    to download it here http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx


    Example for commands to change the peer of the NTP servers are as below

    Code:
    psexec @C:\Fouad\servers.txt -u admin -p password -d w32tm /config /manualpeerlist:"rentime3.egyeng.com,0x8 rentime2.egyeng.com,0x8" /syncfromflags:MANUAL >> c:\Fouad\report.txt 2>&1
    psexec @C:\Fouad\servers.txt -u admin -p password -d w32tm /config /update  >> c:\Fouad\report.txt 2>&1
    psexec @C:\Fouad\servers.txt -u admin -p password -d net stop w32time  >> c:\Fouad\report.txt 2>&1
    psexec @C:\Fouad\servers.txt -u admin -p password -d net start w32time  >> c:\Fouad\report.txt 2>&1
    
    
    pause
    @C:\Fouad\servers.txt >> put all servers list in servers.txt to execute the commands on all servers.
    -u admin -p password : admin and password to be used on servers / delete this part if you will use same account you run the batch with it.


    Small simple batch
    Code:
    psexec.exe \\Servername cmd \c \\mybatch.bat

    NOTE: put PsExec.exe , Servers.txt and your batch on same folder which named here Fouad under c drive mybatch.bat
    Last edited by Mohamed Fouad; 05-05-2014 at 09:29 PM.


  2. Facebook Comments - تعليقـك على الفيس بوك يسعدنا ويطور مجهوداتنـا


  3. Forum Ads:

  4. Forum Ads:

    اضفط هنا لمعرفة تفاصيل الإعلانات بالموقع


  5. Forum Ads:

    -->

Similar Threads

  1. Replies: 0
    Last Post: 13-02-2013, 10:49 PM
  2. Replies: 1
    Last Post: 05-04-2011, 04:04 PM
  3. Replies: 3
    Last Post: 10-03-2010, 06:24 PM
  4. 85 commands very important to know
    By mohamadoz in forum Microsoft
    Replies: 2
    Last Post: 21-08-2009, 09:23 AM
  5. 103 Useful Run Commands
    By mohamadoz in forum Microsoft
    Replies: 1
    Last Post: 27-02-2009, 12:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

أقسام المنتدى

الروابط النصية

تابع جروبنا على الفيس بوك

صفحة Egypt Engineers على الفيس بوك

تابعنا على linkedin

جروبنا على الياهو جروب