Batchcompute command line cmd Start and Stop IIS restart command

Source: Internet
Author: User
Http://hbsl.blog.163.com/blog/static/13242928200911178366391/

Start IIS:

Net start IISADMIN (the entire IIS Service)

Net start w3svc (WWW Web Service)

Stop IIS:

Net stop IISADMIN/Y (the WWW, FTP, and SMTP services are automatically stopped)

If you use IIS with built-in FTP, you can also execute

Net start msftpsvc

Command to start the FTP origin Network

You can also use the iisreset command to add parameters to control IIS through the nameline:

C: \ Documents and Settings \ Administrator> iisreset /?

 

Iisreset. EXE (c) Microsoft Corp. 1998-1999

Usage:

Iisreset [computername]

 

/Restart stop and restart all Internet services.

/Start all Internet services.

/Stop: Stop all Internet services.

/Reboot restarts the computer.

/Rebootonerror if an error occurs when you start, stop, or reSTART Internet services, restart the computer. Origin Network News Channel

/Noforce do not forcibly terminate Internet services if an attempt to stop a service fails.

/Timeout: Val specifies the timeout value (in seconds) to wait for the successful termination of Internet services.

If the rebootonerror parameter has been specified, You can restart the computer after timeout.

The default value is 20 seconds to restart, 60 seconds to stop, and 0 seconds to restart. Produced by bnxb

/Status: displays the status of all Internet services.

/Enable Internet service restart on the local system.

/Disable Disable Internet service restart on the local system.

 

Appendix: Batch restart IIS-WEB server command, objective: By writing your ownCodeEnable IIS service restart

 

Steps:

1. Create a new notebook named iis.txt

2.open iis.txt and add the following code:

 

@ Echo off

Net stop IISADMIN/Yes

Net start IISADMIN

Net start w3svc

3. Save it as IIS. bat. Double-click IIS. BAT to start the batch processing command.

Copy the file content together with the permission

When copying a file on the server, you often need to copy the file with the permission to connect to it. Run the following command to copy the file:
Xcopy G: \ f: \/O/E/C
In this way, you can copy all the content of the G: disk to the F: disk, connect to sub-directories, connect permissions, and ignore error information. Note that if you are copying website content, stop IIs before copying.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.